/**
  * prepare
  * 
  * @param   void
  * 
  * @return  bool
  **/
 public function prepare()
 {
     parent::prepare();
     $this->_setupCategoryManager('page');
     return true;
 }
示例#2
0
 /**
  * _doExecute
  *
  * @param    void
  *
  * @return    Enum
  **/
 protected function _doExecute()
 {
     $ret = parent::_doExecute();
     $this->_saveWorkflow();
     $this->_updateFile();
     return $ret;
 }
 /**
  * prepare
  * 
  * @param   void
  * 
  * @return  bool
  **/
 public function prepare()
 {
     return parent::prepare() && is_object($this->mObject);
 }
示例#4
0
 /**
  * prepare
  * 
  * @param   void
  * 
  * @return  bool
  **/
 public function prepare()
 {
     $result = parent::prepare();
     $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('status', Lenum_Status::PUBLISHED);
         $this->mObject->set('maintable_id', $this->_getMaintableId());
         $this->mObject->set('category_id', $this->_getCatId());
         foreach ($this->mDefinitions as $field) {
             if (in_array($field->get('field_type'), array('string', 'int'))) {
                 $this->mObject->set($field->get('field_name'), $field->get('options'));
             }
         }
         $this->_prepareRequest();
     }
     $this->mObject->loadMaintable();
     if (count($this->mObject->mMaintable) != 1) {
         $this->mRoot->mController->executeRedirect($this->_getNextUri('page', 'list'), 1, _MD_XCCK_ERROR_INVALID_MAINTABLE);
     }
     $this->_setupCategoryManager('page');
     //setup tags
     $this->mObject->loadTag();
     XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.PrepareEditAction', new XCube_Ref($this->mObject), new XCube_Ref($this->mActionForm));
     return $result;
 }