db = $db; $this->translator = $translator; $this->requestStack = $requestStack; } /** * @Callback(table="tl_vr_wa_attribute", target="config.onload") */ public function onLoadCallback(DataContainer $dc) { if (null === $dc || !$dc->id || 'edit' !== $this->requestStack->getCurrentRequest()->query->get('act')) { return; } if (($attribute = WeinanlieferungAttributeModel::findByPk($dc->id)) === null || ($group = $attribute->getRelated('pid')) === null) { return; } if ($group->type == 'text') { PaletteManipulator::create() ->addField('description','title') ->applyToPalette('default', 'tl_vr_wa_attribute'); } } }