Wenn ich den input_field_callback im MultiColumnWizard benutze:
PHP-Code:
$GLOBALS['TL_DCA']['tl_content']['fields']['chesstable_markierungen'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['chesstable_markierungen'],
'exclude' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
'tl_class' => 'long clr',
'buttonPos' => 'middle',
'buttons' => array
(
'new' => false,
'copy' => false,
'delete' => false,
'move' => false,
'up' => false,
'down' => false
),
'columnFields' => array
(
'rows' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['chesstable_markierungen_rows'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50', 'style' => 'width:100%', 'mandatory' => false),
),
'info' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['chesstable_markierungen_info'],
'input_field_callback' => array('tl_content_chesstable', 'getMarkierungen'),
),
)
),
'sql' => "blob NULL",
);
bekomme ich eine Fehlermeldung:
Code:
Argument 1 passed to tl_content_chesstable::getMarkierungen() must be an instance of Contao\DataContainer, instance of
MenAtWork\MultiColumnWizardBundle\Contao\Widgets\MultiColumnWizard given, called in /vendor/menatwork/contao-multicolumnwizard-bundle/src/Contao/Widgets/MultiColumnWizard.php on line 1103
Ich habe schon überlegt, weil ich die Spalten (und Zeilen) sowieso alle dynamisch generieren muß, den columnsCallback des MCW zu benutzen. Aber da scheint der Code nur in eine Funktion ausgelagert zu sein.
Lesezeichen