_restAlias) { $this->_do404(); } $this->_testObj = new TestObj(); if (null === ($test = $this->_testObj->setPrimaryKey($this->_restAlias)->getData())) { $this->_do404(); } $this->_getDataObj()->setFilter('testId', $test['id']); $this->_initAction(); $this->_callAction(); } protected function _initAction() { parent::_initAction(); $this->_initNavigation(); return $this; } protected function _initNavigation() { $this->_doc->setHeader(null); $this->_pageHeaderTemplates = []; $module = new Module(); /** @var Navigation $testNavigation */ $testNavigation = $module->getService('testAdminNavigation'); $testNavigation->setEntity($this->_testObj->getData()); $testNavigation->showItem(); $testNavigation->exec(); /** @var Navigation $slideNavigation */ $slideNavigation = $module->getService('testSlideAdminNavigation', ['testId' => $this->_testObj->getData('id')]); $slideNavigation->setAction($this->_action); $slideNavigation->setEntity($this->_getDataObj()->getData()); $slideNavigation->exec(); return $this; } protected function _initFormPart(array &$data, $part, $action) { if ('new' == $action) { if (0 === strpos($part, 'questions[') && empty(Qs_Array::get($data, $part))) { Qs_Array::add($data, $part, []); } Qs_Array::add($data, $part, []); } return $this; } }