Ein Kunde würde gerne Icons zu seinen Stellenanzeigen hinzufügen, wofür ich gerne das Rocksolid Iconpicker Bundle im contao-jobs-basic-bundle einsetzen möchte.
Das DCA wurde entsprechend erweitert.
Das Feld taucht auch im Backend auf, jedoch kann ich die Datenbankmigration im Contao Manager nicht dazu bewegen, das zusätzliche Feld anzulegen. Ich erhalte immer die Meldung: "Keine ausstehenden Migrationen oder Schema-Änderungen gefunden. Deine Datenbank ist auf dem aktuellsten Stand."PHP-Code:<?php
// contao/dca/tl_plenta_jobs_basic_offer.php
use Contao\CoreBundle\DataContainer\PaletteManipulator;
/* ---- */
/* Icon */
/* ---- */
// Add icon palette
PaletteManipulator::create()
->addLegend('icon_legend', 'settings_legend', PaletteManipulator::POSITION_BEFORE)
->addField('icon', 'icon_legend', PaletteManipulator::POSITION_APPEND)
->applyToPalette('default', 'tl_plenta_jobs_basic_offer')
;
// Add icon field
$GLOBALS['TL_DCA']['tl_plenta_jobs_basic_offer']['fields']['icon'] = [
'inputType' => 'rocksolid_icon_picker',
'eval' => ['iconFont' => 'files/fonts/icons.svg'],
'sql' => "varchar(4) NULL"
];
Als Gegenprobe habe ich das DCA für tl_page ebenfalls entsprechend ergänzt.
Das hat die Datenbankmigration auch auf Anhieb erkannt.PHP-Code:<?php
// contao/dca/tl_page.php
use Contao\CoreBundle\DataContainer\PaletteManipulator;
/* ---- */
/* Icon */
/* ---- */
// Add icon palette
PaletteManipulator::create()
->addLegend('icon_legend:hide', 'layout_legend', PaletteManipulator::POSITION_BEFORE)
->addField('icon', 'icon_legend:hide', PaletteManipulator::POSITION_APPEND)
->applyToPalette('regular', 'tl_page')
;
// Add icon field
$GLOBALS['TL_DCA']['tl_page']['fields']['icon'] = [
'inputType' => 'rocksolid_icon_picker',
'eval' => ['iconFont' => 'files/fonts/icons.svg'],
'sql' => "varchar(4) NULL"
];
Hat jemand eine Idee, warum das bei dem Bundle nicht klappt?

Zitieren
