/** * prepare * * @param void * * @return bool **/ public function prepare() { parent::prepare(); $this->mObject->set('status', Xcck_Utils::getDefaultStatus($this->mAsset->mDirname)); //subtable requires category_id(parent id) if ($this->_getCatId() == 0 && $this->_isSubtable()) { $this->mRoot->mController->executeRedirect($this->_getNextUri('page', 'list'), 1, _MD_XCCK_ERROR_MAINTABLE_REQUIRED); } $this->mDefinitions = Legacy_Utils::getModuleHandler('definition', $this->mAsset->mDirname)->getFields(); if ($this->mObject->isNew()) { $this->mObject->set('uid', Legacy_Utils::getUid()); $this->mObject->set('p_id', $this->_getParentId()); $this->mObject->set('category_id', $this->_getCatId()); $this->_prepareRequest(); } $this->_setupCategoryManager('page'); $this->mObject->loadPath(); //setup tags $this->mObject->loadTag(); XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.PrepareEditAction', new XCube_Ref($this->mObject), new XCube_Ref($this->mActionForm)); return true; }