Wenn ich die Anleitung zum Anlegen weiterer Felder unter https://github.com/markocupic/calend...booking-bundle folge, erzeugt das nach dem Löschen des Produktionscache einen Fehler im Installtool. Der geht dann nur weg, wenn ich die Datei wieder lösche.
Fehlt bei dem Beispielcode etwas (zB PaletteManipulator?) - Wie würde man das richtig anlegen für ein zusätzliches Textfeld ("Firma")?
Code:
<?php
//app/Resources/contao/dca/tl_calendar_events_member.php
$GLOBALS['TL_DCA']['tl_calendar_events_member']['fields']['foodHabilities'] = [
'exclude' => true,
'search' => true,
'sorting' => true,
'inputType' => 'select',
'options' => ['vegetarian', 'vegan'],
'eval' => ['includeBlankOption' => true, 'tl_class' => 'w50'],
'sql' => "varchar(255) NOT NULL default ''",
];
// Add custom fields to palette and make fields visible in the Contao backend.
Contao\CoreBundle\DataContainer\PaletteManipulator::create()
->addLegend('food_legend', 'personal_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER)
->addField(['foodHabilities'], 'food_legend', Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_APPEND)
->applyToPalette('default', 'tl_calendar_events_member');
Und Verständnisfrage: warum wird das unter app/Resources/contao/dca/ abgelegt und nicht unter contao/dca?
Lesezeichen