Last active
July 29, 2021 10:16
-
-
Save markocupic/41496afeef407c975fa7f88fcb8ccd00 to your computer and use it in GitHub Desktop.
Extending tl_calendar_events_member.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// For contao > 4.4: | |
// For extending your dca, store your custom dca file in: TL_ROOT/contao/dca/tl_calendar_events_member.php | |
use Contao\CoreBundle\DataContainer\PaletteManipulator; | |
PaletteManipulator::create() | |
->addField( | |
['mycustom1', 'mycustom2'], | |
'notes_legend', | |
PaletteManipulator::POSITION_APPEND | |
) | |
->applyToPalette( | |
'default', | |
'tl_calendar_events_member' | |
); | |
$GLOBALS['TL_DCA']['tl_calendar_events_member']['fields']['mycustom1'] = [ | |
'filter' => true, | |
'sorting' => true, | |
'search' => true, | |
'inputType' => 'text', | |
'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], | |
'sql' => "varchar(255) NOT NULL default ''", | |
]; | |
$GLOBALS['TL_DCA']['tl_calendar_events_member']['fields']['mycustom2'] = [ | |
'filter' => true, | |
'sorting' => true, | |
'search' => true, | |
'inputType' => 'text', | |
'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], | |
'sql' => "varchar(255) NOT NULL default ''", | |
]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment