Date Column

Shows a formatted date.

Type date
Require
Options
Class Enhavo\Bundle\AppBundle\Column\Type\DateType
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

Options

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

format

type: string default: d.m.Y

Use format to display date. You can find all possible values on the date page of the php documentation.

columns:
    myColumn:
        date: r
        # ... 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

sorting_property

type: string default: null

Defines which property of the resource the column is sorted by. The resource must provide a getter method for this property.

columns:
    myColumn:
        sorting_property: myEntityProperty
        # ... further option