protected function createControls()
 {
     $this->setPostback('user', 'endEditUser', array('id' => $this->controller->user->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Benutzer » bearbeiten');
     $lookupSprache = new DataControls\LookupBoxControl(null, 'us_sprache');
     $lookupSprache->setLookupEntity(new Sprache())->setTextfield('sp_bezeichnung')->setValuefield('sp_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->user->us_sprache);
     $anreden = new FormControls\InputSelectControl(null, 'us_anrede');
     $anreden->addOption(0, '-- bitte wählen --');
     $anreden->addOption('Firma', 'Firma');
     $anreden->addOption('Frau', 'Frau');
     $anreden->addOption('Herr', 'Herr');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->user)->setHeader('Stammdaten bearbeiten')->addRow('us_benutzername')->addRow('us_aktiv')->addRow('Anrede', $anreden)->addRow('us_vorname')->addRow('us_name')->addRow('us_profilbild')->addRow('us_email')->addRow('Sprache', $lookupSprache)->addRow('us_anonymous')->addRow('us_passwort');
     $button = new SaveButtonControl($panel, 'btnSave');
     if ($this->request->action != 'newUser') {
         $pnlRolle = new CaptionedPanelControl($this, 'pnlRolle');
         $pnlRolle->setCaption('Rollenzuweisung');
         $lookupRolle = new DataControls\LookupBoxControl(null, 'ro_id');
         $lookupRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setValuefield('ro_id')->showNull(0, '-- bitte wählen --');
         $sbmRolle = new ExtControls\SubmitDataControl($pnlRolle, 'sbmRolle');
         $sbmRolle->setModule('user')->setAction('insertRolle')->setNotify('grid')->setHiddenValue('user', $this->controller->user->id)->add($lookupRolle);
         $grid = new GridControl($pnlRolle, 'grid');
         $grid->setEntity(new UserRolle(), $this->request);
         $grid->setDeleteAction('removeRolle');
         $grid->createColumn(GridColumn::FIELD, 'us_name', '{us_vorname} {us_name}');
         $grid->createColumn(GridColumn::FIELD, 'ro_bezeichnung');
         $grid->createColumn(GridColumn::DELETELINK);
     }
 }
 /**
  *
  */
 protected function createControls()
 {
     $this->page = $this->controller->page;
     $this->setPostback('site', 'endEditPage', array('id' => $this->page->id, 'pa_site' => $this->page->pa_site, 'pa_module' => 'site', 'pa_action' => $this->page->pa_action, 'initPanel' => $this->request->initPanel));
     $panel = new CaptionedTabPanelControl($this, 'panel');
     $panel->setCaption('Seite » bearbeiten');
     $tabStammdaten = $panel->tabs->addTab('Stammdaten');
     $tabLayout = $panel->tabs->addTab('Layout');
     $lookup = new LookupBoxControl(null, 'pa_parent');
     $lookup->setLookupEntity(new Page())->setTextfield('pa_bezeichnung')->setValuefield('pa_id')->setGroupfield('parent')->setFilter(array('site' => $this->page->pa_site))->showNull(0, '-- Kein Parent --')->preSelect($this->page->pa_parent);
     $edit = new EditControl($tabStammdaten, 'edit');
     $edit->setEntity($this->page)->addRow('pa_ausblenden')->addRow('pa_bezeichnung')->addRow('Parent-Page', $lookup)->addRow('pa_css')->addRow('-')->addRow('pa_link')->addRow('pa_description')->addRow('pa_keywords')->addRow('pa_icon');
     $button = new SaveButtonControl($tabStammdaten, 'button');
     // region Texte
     $texte = new TranslatedTextControl($tabStammdaten, 'texte');
     $texte->setCaption('Angezeiger Text im Menü');
     $texte->setElement($this->page->getElementId());
     if ($this->request->action === 'newPage' && isset($this->request->text)) {
         $texte->setText($this->request->text);
     }
     // endregion
     // region Rechte
     $panelRechte = new CaptionedPanelControl($tabStammdaten, 'panelRechte');
     $panelRechte->setCaption('Seiten » Berechtigungen');
     $security = new SecurityCheckboxControl($panelRechte, 'berechtigung');
     $security->setElement($this->page->getElementId());
     // endregion
     // region Layout (Neu)
     if ($this->page->pa_action == 'composePage') {
         $rootRegions = Region::loadByPageAndParent($this->page->id, 0);
         foreach ($rootRegions as $region) {
             $block = $region->getBlock();
             if ($block !== null) {
                 $control = $block->toDesignModeHtml();
                 $tabLayout->add($control);
             }
         }
         $addRegion = new Controls\ChooseLayoutBlockControl($tabLayout, 'choose');
         $addRegion->setPage($this->page);
     }
     // endregion
     // region Layout (alt)
     if ($this->page->pa_action == 'useInnerTemplate') {
         $choose = new Controls\ChooseTemplateControl($tabLayout, 'pa_innertemplate');
         $choose->setChosenTemplate($this->page->pa_innertemplate);
         $choose->setOuterTemplate(Template::load($this->controller->site->si_template));
         $edit = new Controls\EditRegionsControl($tabLayout, 'editInPlace');
         $edit->setPageId($this->page->id);
         $edit->setRegions($this->page->getRegions());
         $edit->setTemplate($this->page->pa_innertemplate);
         $button = new ButtonControl($tabLayout, 'button2');
         $button->setCaption('Speichern')->setOnClick("\$('#initPanel').val(1); \$('#postback').submit();");
     }
     // endregion
 }
 protected function createControls()
 {
     $this->setPostback('user', 'endEditRolle', array('id' => $this->controller->rolle->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Rollen » bearbeiten');
     $lobRolle = new DataControls\LookupBoxControl(null, 'ro_parent');
     $lobRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setTextfield2('parent')->setGroupfield('parent')->setValuefield('ro_id')->preSelect($this->controller->rolle->ro_parent)->showNull(0, '-- keine --');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->rolle)->addRow('ro_bezeichnung')->addRow('ro_schluessel')->addRow('ro_aktiv')->addRow('ro_neuebenutzer')->addRow('Parent-Rolle', $lobRolle);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->kategorie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Kategorien » bearbeiten');
     $lookup = new LookupBoxControl(null, 'ck_parent');
     $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->setGroupfield('parent')->showNull(0, '-- Kein Parent --')->preSelect($this->controller->kategorie->ck_parent);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kategorie)->setHeader('Stammdaten bearbeiten')->addRow('ck_bezeichnung')->addRow('Parent', $lookup);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     $texte = new TranslatedTextControl($this, 'texte');
     $texte->setCaption('Angezeiger Text');
     $texte->setElement($this->controller->kategorie->getElementId());
 }
 protected function createControls()
 {
     $this->setPostback('cms', 'endEditArtikel', array('id' => $this->controller->artikel->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Artikel » bearbeiten');
     $lookup = new LookupBoxControl(null, 'ca_kategorie');
     $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->artikel->ca_kategorie);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->artikel)->setHeader('Stammdaten bearbeiten')->addRow('ca_bezeichnung')->addRow('Kategorie', $lookup)->addRow('ca_aktiv')->addRow('ca_geschrieben_am')->addRow('ca_anzeigen_ab_dem')->addRow('ca_anzeigen_bis_zum');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     $texte = new Controls\TranslatedTextControl($this, 'titel');
     $texte->setCaption('Titel');
     $texte->setElement($this->controller->artikel->getElementId() . '.titel');
     $texte = new Controls\TranslatedTextControl($this, 'intro');
     $texte->setCaption('Text');
     $texte->setElement($this->controller->artikel->getElementId() . '.intro');
     $texte->setWYSIWYG(true);
     // Bilder
     if ($this->request->action != 'newArtikel') {
         $wrapper = new WrapperControl($this, 'wrapGalerie');
         $wrapper->setModule('medien')->setAction('galerie')->addParam('showDrehen', true)->addParam('showSave', true)->addParam('showDelete', true)->addParam('upload', true)->addParam('id', $this->controller->artikel->ca_kollektion);
     }
 }
 protected function getStdEditControl($readOnly = false)
 {
     $tmpClass = $this->getRelationClassName();
     if ($readOnly || $tmpClass == null) {
         $temp = new InputTextboxControl(null, $this->name);
         $temp->setValue($this->toString())->setReadOnly($readOnly);
     } else {
         $temp = new LookupBoxControl(null, $this->getLocalField());
         $temp->setLookupEntity(new $tmpClass());
         $temp->setValuefield($this->getRelationField());
         $temp->setTextfield($this->field);
         $temp->preSelect($this->entity->felder[$this->getLocalField()]->getValue());
         if ($this->relation->join !== 'inner') {
             $temp->showNull(0, ' ');
         }
     }
     return $temp;
 }