Пример #1
0
 /**
  * executeViewInput
  * 
  * @param    XCube_RenderTarget    &$render
  * 
  * @return    void
  **/
 public function executeViewInput(&$render)
 {
     $render->setTemplateName($this->mAsset->mDirname . '_policy_edit.html');
     $render->setAttribute('actionForm', $this->mActionForm);
     $render->setAttribute('object', $this->mObject);
     $render->setAttribute('group', $this->mGroup);
     $render->setAttribute('targetModule', $this->mTargetModule);
     $render->setAttribute('policyArr', $this->mPolicyArr);
     $render->setAttribute('rankList', Lenum_GroupRank::getList());
     $render->setAttribute('actionList', $this->mActionList);
     //breadcrumb
     $breadcrumbs = array();
     XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.Global.Event.GetBreadcrumbs', new XCube_Ref($breadcrumbs), $this->mAsset->mDirname, $this->mGroup);
     $render->setAttribute('xoops_breadcrumbs', $breadcrumbs);
 }
Пример #2
0
 /**
  * getShowRank()
  * 
  * @param	void
  * 
  * @return	string
  **/
 public function getShowRank()
 {
     $list = Lenum_GroupRank::getList();
     return $list[$this->get('rank')];
 }
Пример #3
0
 /**
  * _getRankList
  * 
  * @param	void
  * 
  * @return	string[]
  **/
 protected function _getRankList()
 {
     $list = Lenum_GroupRank::getList();
     //only "owner" can make others as "owner".
     if ($this->mObjectHandler->isMember($this->mObject->get('group_id'), Legacy_Utils::getUid(), Lenum_GroupRank::OWNER)) {
         return $list;
     } else {
         array_pop($list);
         //remove 'owner' element.
         return $list;
     }
 }