Files
wk-sync-bundle/contao/dca/tl_module.php
T
admin.juergenandClaude Fable 5.1 142afa6e52 Initial version of the W&K sync bundle for Contao 5.7
Import of W&K seminar exports with preview, booking form via form generator
with event-dependent field rules, notification routing, inbox with folders
and CSV export for W&K.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-24 17:42:34 +02:00

33 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use Contao\CoreBundle\DataContainer\PaletteManipulator;
use Mummert\ContaoWkSyncBundle\Controller\FrontendModule\BookingFormController;
use Mummert\ContaoWkSyncBundle\Controller\FrontendModule\BookingStatusController;
$dca = &$GLOBALS['TL_DCA']['tl_module'];
// Eigene Module
$dca['palettes'][BookingFormController::TYPE] = '{title_legend},name,headline,type;{config_legend},cal_calendar;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},cssID';
$dca['palettes'][BookingStatusController::TYPE] = '{title_legend},name,headline,type;{config_legend},cal_calendar;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},cssID';
// Kategoriefilter für die Kalender-Module des Contao-Kerns
$dca['fields']['wkCategories'] = [
'inputType' => 'checkbox',
'foreignKey' => 'tl_wk_category.title',
'eval' => ['multiple' => true, 'tl_class' => 'clr'],
'sql' => ['type' => 'blob', 'length' => 65535, 'notnull' => false],
];
foreach (['eventlist', 'eventmenu', 'eventmenucal_day', 'calendar'] as $palette) {
if (!isset($dca['palettes'][$palette])) {
continue;
}
PaletteManipulator::create()
->addField('wkCategories', 'cal_calendar', PaletteManipulator::POSITION_AFTER)
->applyToPalette($palette, 'tl_module')
;
}