protected function createControls()
 {
     $button = new ButtonControl($this, 'button');
     $button->setCaption('Neues Modul anlegen')->setLink('modView', 'newModule')->setIcon('plus')->addCssClass('nfs-modal')->setButtonClass(ButtonControl::BUTTON_PRIMARY);
     $listView = new ListViewControl($this, 'lv');
     $listView->setSkinfile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/ModuleListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Version</th><th>Autor</th><th>&nbsp;</th>');
     $listView->addItems(Modules::getAllModules());
 }
 public function toHtml()
 {
     $select = new Html('select');
     $select->addCssClass('lookup')->addCssClass('form-control');
     $select->addAttribute('name', $this->id);
     $select->addAttribute('id', $this->id);
     $modules = Modules::getAllModules();
     $option = new Html('option');
     $option->addAttribute('value', '0')->addInnerHtml('-- bitte wählen --');
     $select->addInnerHtml($option);
     foreach ($modules as $module) {
         if (!$module instanceof Module) {
             continue;
         }
         $option = new Html('option');
         $option->addAttribute('value', $module->qualifiedName)->addInnerHtml($module->description);
         if ($module->name == $this->selectedItem) {
             $option->addAttribute('selected', 'selected');
         }
         $select->addInnerHtml($option);
     }
     return $select->render();
 }