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();
 }
 public function toHtml()
 {
     $panel = new Html('div');
     $panel->addAttribute('id', 'actionLookup');
     $select = new Html('select');
     $select->addCssClass('lookup')->addCssClass('form-control');
     $select->addAttribute('name', $this->id);
     $select->addTo($panel);
     $actions = array();
     if (isset($this->module)) {
         $actions = Modules::getModule($this->module)->getAllMenuActions();
     }
     foreach ($actions as $action) {
         $option = new Html('option');
         $option->addAttribute('value', $action->name)->addInnerHtml($action->description);
         if ($action->name == $this->selectedItem) {
             $option->addAttribute('selected', 'selected');
         }
         $select->addInnerHtml($option);
     }
     return $panel->render();
 }