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() { $this->addChild(new \NethServer\Module\PackageManager\Modules()); $this->addChild(new \NethServer\Module\PackageManager\Review()); $this->addChild(new \NethServer\Module\PackageManager\Packages()); $this->addChild(new \NethServer\Module\PackageManager\EditModule()); parent::initialize(); }
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() { $this->optimizeNextView = FALSE; parent::initialize(); $this->loadChildrenDirectory(); $sortf = function (\Nethgui\Module\ModuleInterface $a, \Nethgui\Module\ModuleInterface $b) { if ($a instanceof \NethServer\Module\FirstConfigWiz\Cover) { return -1; } if ($b instanceof \NethServer\Module\FirstConfigWiz\Cover) { return 1; } return 0; }; $this->sortChildren($sortf); }
public function initialize() { $this->loadChildrenDirectory($this); // Create an empty record adapter and set it into child modules, so // that child parameters can be declared in initialize(): $this->recordAdapter = new \Nethgui\Adapter\RecordAdapter(); foreach ($this->getChildren() as $child) { $child->setAdapter($this->recordAdapter); } // Sort child modules so that "Personal" is actually the first (shown by default). $firstModule = 'Personal'; $this->sortChildren(function (\Nethgui\Module\ModuleInterface $a, \Nethgui\Module\ModuleInterface $b) use($firstModule) { if ($a->getIdentifier() === $firstModule) { return -1; } elseif ($b->getIdentifier() === $firstModule) { return 1; } return 0; }); parent::initialize(); }
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 initialize() { if (!$this->hasAdapter()) { throw new \LogicException(sprintf('%s: you must call setTableAdapter() before %s::initialize()', get_class($this), __CLASS__), 1325610869); } // propagate the adapter to every that is missing it: foreach ($this->getChildren() as $childAction) { if ($childAction instanceof \Nethgui\Controller\Table\AbstractAction && !$childAction->hasAdapter()) { $childAction->setAdapter($this->getAdapter()); } } /** * Calling the parent method at this point ensures that the table * adapter has been set BEFORE the child initialization */ parent::initialize(); }
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()); }