/** * Add a child module, propagating the adpater settings. * * @api * @param \Nethgui\Module\ModuleInterface $childModule * @return array */ public function addChild(\Nethgui\Module\ModuleInterface $childModule) { if ($this->hasAdapter() && $childModule instanceof AbstractAction) { $childModule->setAdapter($this->getAdapter()); } return parent::addChild($childModule); }
public function initialize() { parent::initialize(); $this->setViewTemplate(function (\Nethgui\Renderer\Xhtml $view) { $p = $view->panel(); foreach ($view->getModule()->getChildren() as $child) { $p->insert($view->inset($child->getIdentifier())); } return $p; }); $this->loadChildrenDirectory(); $this->sortChildren(function ($a, $b) { if ($a->getIdentifier() == 'Index') { return -1; } if ($b->getIdentifier() == 'Index') { return 1; } return 0; }); }
public function initialize() { parent::initialize(); $this->loadChildrenDirectory(); $this->sortChildren(array($this, "sortPlugin")); }
public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); $this->notifications->defineTemplate('adminTodo', \NethServer\Module\AdminTodo::TEMPLATE, 'bg-yellow'); }
public function initialize() { parent::initialize(); $this->loadChildrenDirectory($this, 'Dashboard/Applications'); $this->sortChildren(array($this, "sortApplication")); }
public function prepareView(\Nethgui\View\ViewInterface $view) { parent::prepareView($view); if ($this->moduleId) { $view['moduleView'] = $view[$this->moduleId]; unset($view[$this->moduleId]); } }