-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
It would be really nice to have option to define grid in i.e. Resource/config/datagrid/xxx.yml
with something like that:
columns:
id:
type: number
options:
label: Identity
title:
type: text
options:
editable: true
author:
type: text
options:
editable: true
field_mapping: [author_name, author_surname, author_email]
value_glue: '<br/>'
publication:
type: datetime
options:
field_mapping: [publication_date]
value_format: 'Y.m.d H:i:s'
label: Publication date
Would be transfered into calls:
$grid
->addColumn('id', 'number', array('label' => 'Identity'))
->addColumn('title', 'text', array('label' => 'Title'))
->addColumn('author', 'text', array(
'field_mapping' => array(
'author_name',
'author_surname',
'author_email'
),
'value_glue' => '<br/>',
'label' => 'Author'
))
->addColumn('publication', 'datetime', array(
'field_mapping' => array('publication_date'),
'value_format' => 'Y.m.d H:i:s',
'label' => 'Publication date'
))
;
What do you think about this?
Metadata
Metadata
Assignees
Labels
No labels