public function initialize() { parent::initialize(); $provider = $this->getPlatform()->getDatabase('configuration')->getProp('sssd', 'Provider'); $children = array(); if (class_exists("\\NethServer\\Module\\Account\\DomainController")) { # Samba 4 is installed if ($provider === 'none') { # and it's not configured, we must configure it $children[] = new \NethServer\Module\Account\DomainController(); $children[] = new \NethServer\Module\Account\Type(); $children[] = new \NethServer\Module\Account\AuthProvider(); } else { # already configured, display users $children[] = new \NethServer\Module\Account\Type(); $children[] = new \NethServer\Module\Account\AuthProvider(); $children[] = new \NethServer\Module\Account\DomainController(); } } else { if ($provider === 'none') { # nothing configured, display form for remote provider $children[] = new \NethServer\Module\Account\AuthProvider(); $children[] = new \NethServer\Module\Account\Type(); } else { # display remote users $children[] = new \NethServer\Module\Account\Type(); $children[] = new \NethServer\Module\Account\AuthProvider(); } } foreach ($children as $child) { $this->addChild($child); } }
public function initialize() { parent::initialize(); $this->addChild(new \Nethgui\Module\Help\Show()); $this->addChild(new \Nethgui\Module\Help\Template()); $this->addChild(new \Nethgui\Module\Help\Read()); foreach ($this->getChildren() as $child) { if ($child instanceof Help\Common) { $child->setFileNameResolver($this->fileNameResolver); } } }
public function initialize() { parent::initialize(); $this->addChild(new \NethServer\Module\Pki\Show()); $this->addChild(new \NethServer\Module\Pki\Generate()); }
public function initialize() { parent::initialize(); $this->addChild(new \NethServer\Module\Account\AuthProvider\Index()); $this->addChild(new \NethServer\Module\Account\AuthProvider\Authenticate()); }
public function renderIndex(\Nethgui\Renderer\Xhtml $renderer) { $this->wizDecorator['content'] = parent::renderIndex($renderer); return $renderer->inset('Decorator'); }
public function prepareView(\Nethgui\View\ViewInterface $view) { if ($this->getRequest()->isMutation()) { $this->getPlatform()->setDetachedProcessCondition('success', array('location' => array('url' => $view->getModuleUrl('Modules?installSuccess'), 'freeze' => TRUE))); $this->getPlatform()->setDetachedProcessCondition('failure', array('location' => array('url' => $view->getModuleUrl('Modules?installFailure&taskId={taskId}'), 'freeze' => TRUE))); } parent::prepareView($view); }
public function process() { parent::process(); // If something has been changed in the original table persist modifications: $this->adapter->save(); }
public function renderIndex(\Nethgui\Renderer\Xhtml $renderer) { $this->sortChildren(function (\Nethgui\Module\ModuleInterface $a, \Nethgui\Module\ModuleInterface $b) { if ($a->getIdentifier() === 'read') { return -1; } elseif ($b->getIdentifier() === 'read') { return 1; } return 0; }); return parent::renderIndex($renderer); }
public function renderIndex(\Nethgui\Renderer\Xhtml $renderer) { $indexId = $this->getIndexAction()->getIdentifier(); // Make sure Index action is the first $this->sortChildren(function (\Nethgui\Module\ModuleInterface $a, \Nethgui\Module\ModuleInterface $b) use($indexId) { if ($a->getIdentifier() === $indexId) { return -1; } elseif ($b->getIdentifier() === $indexId) { return 1; } return 0; }); return parent::renderIndex($renderer); }
public function initialize() { parent::initialize(); $this->loadChildren(array('*\\Configure', '*\\Authenticate')); }
public function initialize() { parent::initialize(); $this->addChild(new LogViewer\Find()); $this->addChild(new LogViewer\Read()); }
public function initialize() { parent::initialize(); $this->addChild(new \NethServer\Module\UserProfile\Personal()); $this->addChild(new \NethServer\Module\UserProfile\ChangePassword()); }