protected function createControls()
 {
     $this->setPostback('modView', 'endEditModule', array('initPanel' => $this->request->initPanel));
     $panel = new CaptionedTabPanelControl($this, 'pnlStammdaten');
     $panel->setCaption('Details zu Modul ' . $this->controller->current->name);
     $tabStamm = $panel->tabs->addTab('Stammdaten');
     $tabAction = $panel->tabs->addTab('Actions');
     $tabEntity = $panel->tabs->addTab('Entitäten');
     $panel->tabs->setInitPanel($this->request->initPanel);
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->current->name)->setReadOnly(true);
     $inputQualifiedName = new InputTextboxControl(null, 'qualifiedName');
     $inputQualifiedName->setValue($this->controller->current->qualifiedName)->setReadOnly(true);
     $inputNamespace = new InputTextboxControl(null, 'name');
     $inputNamespace->setValue($this->controller->current->namespace)->setReadOnly(true);
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->current->description);
     $inputAuthor = new InputTextboxControl(null, 'author');
     $inputAuthor->setValue($this->controller->current->author);
     $inputVersion = new InputTextboxControl(null, 'version');
     $inputVersion->setValue($this->controller->current->version);
     $panel = $tabStamm;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroup');
     $btnForward = new ButtonControl($btnGroup, 'btnInstall');
     $btnForward->setCaption('Installieren')->setButtonClass(ButtonControl::BUTTON_WARNING)->setLink('modView', 'install', array('id' => $this->request->id))->setIcon('arrow-right');
     $btnForward = new ButtonControl($btnGroup, 'btnBerechtigungen');
     $btnForward->setCaption('Berechtigungen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setLink('modView', 'berechtigungen', array('id' => $this->request->id))->setIcon('lock');
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Namespace', $inputNamespace)->addRow('Qualified-Name', $inputQualifiedName)->addRow('Beschreibung', $inputDescription)->addRow('Autor', $inputAuthor)->addRow('Version', $inputVersion);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     // --------------------------------------------------------------------------------------------------
     $panel = $tabAction;
     $btnGroupAction = new ButtonGroupControl($panel, 'btnGroupAction');
     $btnNeu = new ButtonControl($btnGroupAction, 'btnNeu');
     $btnNeu->setCaption('Neue Aktion anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newAktion', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnCRUD = new ButtonControl($btnGroupAction, 'btnCRUD');
     $btnCRUD->setCaption('CRUD Aktionen anlegen')->setIcon('plus')->setLink('modView', 'newCRUD', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $listView = new ListViewControl($panel, 'lv');
     $listView->setSkinFile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/AktionListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Menü</th><th>Sec-Level</th><th>Next-Typ</th><th>Next-Item</th><th>&nbsp;</th>');
     $listView->addItems($this->controller->aktionen);
     $panelEnt = $tabEntity;
     $panel = $panelEnt;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroupEntity');
     $btnNeu = new ButtonControl($btnGroup, 'btnNeuEntity');
     $btnNeu->setCaption('Neue Entität anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newEntity', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnForward = new ButtonControl($btnGroup, 'btnForward');
     $btnForward->setCaption('DB aktualisieren')->setLink('modView', 'forwardEngineerAll', array('id' => $this->request->id))->setIcon('arrow-right');
     foreach ($this->controller->entities as $name => $entity) {
         $btnEdit = new ButtonControl(null, 'btnEdit');
         $btnEdit->setLink('ModView', 'editEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('pencil')->setCaption('Bearbeiten')->setSize(ButtonControl::SIZE_EXTRASMALL)->addCssClass('nfs-modal');
         $btnDelete = new ButtonControl(null, 'btnDelete');
         $btnDelete->setLink('ModView', 'deleteEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('trash')->setCaption('Löschen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setSize(ButtonControl::SIZE_EXTRASMALL);
         $panel = new CaptionedPanelControl($panelEnt, '');
         if ($this->request->hash == 'entity_' . $name) {
             $panel->setCaption('<a data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse in">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         } else {
             $panel->setCaption('<a class="collapsed" data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         }
         $btnGroup = new ButtonGroupControl($panel, '');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu');
         $btnNeu->setCaption('Neues Feld')->setIcon('plus')->setLink('modView', 'newFeld', array('current' => $this->request->id, 'entity' => $name))->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu2');
         $btnNeu->setCaption('Neue Relation')->setIcon('plus')->setLink('modView', 'newRelation', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu3');
         $btnNeu->setCaption('Neues Lookup')->setIcon('plus')->setLink('modView', 'newLookup', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnForward');
         $btnNeu->setCaption('In DB anlegen')->setIcon('arrow-right')->setLink('modView', 'forwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $btnCRUD = new ButtonControl($btnGroup, 'btnBackward');
         $btnCRUD->setCaption('XML erzeugen')->setIcon('arrow-left')->setLink('modView', 'backwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $listView = new ListViewControl($panel, '');
         $listView->setSkinfile(__DIR__ . '/FeldListView.template.html');
         $listView->setItemSkinFile(__DIR__ . '/FeldListItem.skin');
         $listView->setVar('moduleName', $this->request->id);
         $listView->setVar('entityName', $name);
         $listView->addItems($entity['felder']);
     }
 }