$GLOBALS['TL_DCA']['tl_article']['fields']['title'] = [ 'label' => 'Title', 'inputType' => 'text', 'eval' => ['mandatory' => true, 'maxlength' => 255] ];
$fieldAttributes = \Widget::getAttributesFromDca( $GLOBALS['TL_DCA']['tl_article']['fields']['title'], // The DCA field definition 'title', // The field name 'text', // The default input type ['mandatory' => true] // Additional attributes to be merged with DCA );
[ 'id' => 'ctrl_title', 'name' => 'title', 'value' => '', 'type' => 'text', 'label' => 'Title', 'mandatory' => true, 'maxlength' => 255 ]
$GLOBALS['TL_DCA']['tl_my_module'] = [ 'config' => [ 'dataContainer' => 'Table', ... ], 'fields' => [ 'my_field' => [ 'label' => 'My Field', 'inputType' => 'fileTree', 'eval' => ['filesOnly' => true, 'fieldType' => 'radio'] ], ... ], ... ];
$fieldAttributes = \Widget::getAttributesFromDca( $GLOBALS['TL_DCA']['tl_my_module']['fields']['my_field'], // The DCA field definition 'my_field', // The field name 'fileTree', // The default input type ['fieldType' => 'checkbox'] // Additional attributes to be merged with DCA );
[ 'id' => 'ctrl_my_field', 'name' => 'my_field', 'value' => '', 'type' => 'fileTree', 'label' => 'My Field', 'filesOnly' => true, 'fieldType' => 'checkbox' ]Package Library: The Typo3 CMS framework.