List Column

Shows all values of a collection as a list.

Type list
Require
Options
Class Enhavo\Bundle\AppBundle\Column\Type\ListType
Parent Enhavo\Bundle\AppBundle\Column\AbstractColumnType

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

item_property

type: string

Defines the property of the items to be used for display within the collection. You can use existing properties of the class or a specially created getter method that returns a string composed of multiple properties.

buttons:
    myColumn:
        property: groups
        item_property: myEntityProperty

Options

separator

type: string default: ‘,’

Define with which char the list should be separated.

columns:
    myColumn:
        separator: 'mySeparator'

label

type: string default: “”

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: null

Overwrites the default translation_domain.

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

width

type: integer default: 1

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

sortable

type: boolean default: false

If value is true, the table can be sorted by the value in this column.

columns:
    myColumn:
        sortable: true|false
        # ... further option

condition

type: string default: null

If a condition is specified, the column will only displayed if the condition is fulfilled.

columns:
    myColumn:
        condition: my_condition
        # ... further option