public function afterConfig() { if (preg_match('@^create@i', $this->controller->action)) { $this->submit->value(__('Benutzer erstellen')); $this->password->insertAfter($this->newField('checkbox', 'sendMail')->label('Passwort zuschicken')); } return parent::afterConfig(); }
public function afterConfig() { if ($this->controller->action == 'create') { // fill parent values $this->headline->insertBefore($this->newField('DropDown', 'parent')->label(__('Vater-Artikel'))); if (!empty($this->controller->params['id']) && ($ParentNode = $this->controller->Node->findById((int) $this->controller->params['id']))) { $this->fieldset->childWithAttribute('name', 'parent')->addOption($ParentNode->id, $ParentNode->get('name')); } else { foreach ($this->controller->Node->tree(null, 0) as $Node) { $this->fieldset->childWithAttribute('name', 'parent')->addOption($Node->id, str_repeat('-', $Node->level) . $Node->get('name')); } } } return parent::afterConfig(); }