Palette Manipulator und tl_member Erweiterung
Zitat:
Zitat von
Spooky
Poste den gesamten Code deines Contao Manager Plugins. Hast du danach composer install ausgeführt?
Hi zusammen,
da es zu diesem Post passt, meine Frage direkt hier dazu: ich möchte meine tl_member erweitern, habe dazu in meinem dca Ordner eine tl_member mit dem folgenden Inhalt erstellt. Der erste use Eintrag von mir muss noch angepasst werden, leider finde ich den Pfad nicht, gibt es irgendwo eine Übersicht welche use-Möglichkeiten es gibt?
Im Verlauf habe ich gesehen, das noch der SetLoadAfter Teil fehlt, hier weiß ich auch nicht, was ich anstatt ContaoCalendarBundle eintragen soll, einfach ContaoCoreBundle?
Ich hoffe der Code ist sonst ok, momentan bekomme ich immer einen Array Fehler angezeigt. Was denkt ihr?
PHP-Code:
use contao\CoreBundle\tl_member.php
use Contao\CoreBundle\DataContainer\PaletteManipulator;
$GLOBALS['TL_DCA']['tl_member']['fields']['Medikation'] = array [
'label' => ['Koordinaten der Medikation', 'Angaben zur Medikation zur Information des Therapeuten'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string', 'length' => 255, 'notnull' => false],
];
$GLOBALS['TL_DCA']['tl_member']['fields']['Sonstiges'] = array [
'label' => ['Sonstige Informationen', 'Angaben zur Information des Therapeuten'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string', 'length' => 255, 'notnull' => false],
];
$GLOBALS['TL_DCA']['tl_member']['fields']['Diagnostik'] = array [
'label' => ['diagnostizierte Erkrankungen', 'Angaben zur Information des Therapeuten'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string', 'length' => 255, 'notnull' => false],
];
$GLOBALS['TL_DCA']['tl_member']['fields']['Notfallkontakt'] = array [
'label' => ['Notfallkontakt', 'wen soll der Therapeut im Notfall informieren'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string', 'length' => 255, 'notnull' => false],
];
$GLOBALS['TL_DCA']['tl_member']['fields']['Skillkette'] = [
'label' => ['Skillkette', 'Welche Skills helfen in welcher Stufe der Anspannunng'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string', 'length' => 255, 'notnull' => false],
];
$GLOBALS['TL_DCA']['tl_member']['fields']['Therapeutenmailadresse'] = array [
'label' => ['Mailadresse des Therapeuten', 'Wenn Informationen freigegeben werden sollen, wird daran der Therapeut identifiziert'],
'inputType' => 'text',
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'string','length' => 255, 'notnull' => false],
];
PaletteManipulator::create()
->addField('Sonstiges,Skillkette,Diagnostik,Medikation', 'personal_legend', PaletteManipulator::POSITION_APPEND)
->applyToPalette('default', 'tl_member')
;
PaletteManipulator::create()
->addField('Therapeutenmailadresse,Notfallkontakt', 'contact_legend', PaletteManipulator::POSITION_APPEND)
->applyToPalette('default', 'tl_member')
;