Picture Column

Show a thumbnail

type picture
require
option
class Enhavo\Bundle\MediaBundle\Table\Column\PictureColumn

Require

property

type: string

Defines which property of the resource is used for the column. The resource has to provide a getter method for that property.

column:
    myColumn:
        property: myEntityProperty

Option

width

type: integer default: |default_width|

Define the width of the column. The default value is 1. Because we are using a 12 column bootstrap grid you have to define a width between 1 and 12. Remind that the sum of all columns in a certain table should be 12.

columns:
    myColumn:
        width: [1-12]
        # ... further option

label

type: string default: |default_label|

Overwrite the default label. It will be translated over the translation service automatically. (See translation_domain)

columns:
    myColumn:
        label: myLabel
        # ... further option

translation_domain

type: string default: |default_translation_domain|

Overwrites the default translation_domain.

columns:
    myColumn:
        translation_domain: my_translation_domain
        # ... further option

pictureWidth

type: integer default: |default_pictureWidth|

Define the width of the thumbnail in pixels. The default value is 60. If the column the column is in is smaller than this value, the thumbnail will be resized to fit the column.

columns:
    myColumn:
        pictureWidth: 60
        # ... further option

pictureHeight

type: integer default: |default_pictureHeight|

Define the height of the thumbnail in pixels. The default value is 60. This value will influence the height of the whole table row.

columns:
    myColumn:
        pictureHeight: 60
        # ... further option