コード例 #1
0
ファイル: Roles.php プロジェクト: BGCX262/zupal-svn-to-git
 public static function getInstance()
 {
     if (is_null(self::$_Instance)) {
         self::$_Instance = new self();
     }
     return self::$_Instance;
 }
コード例 #2
0
ファイル: Form.php プロジェクト: BGCX262/zupal-svn-to-git
 /**
  *
  * @return <type>
  */
 public function load_parents()
 {
     $stub = Zupal_Roles::getInstance();
     $parents = $stub->find(array(), 'id');
     foreach ($parents as $parent) {
         $this->parent->addMultiOption($parent->identity(), $parent->label);
     }
 }
コード例 #3
0
ファイル: Acl.php プロジェクト: BGCX262/zupal-svn-to-git
 public function __construct()
 {
     foreach (Zupal_Roles::getInstance()->findAll() as $role) {
         $this->addRole($role->as_acl_role());
     }
     foreach (Zupal_Grants::getInstance()->findAll() as $grant) {
         if ($grant->allow) {
             $this->allow($grant->role, $grant->resource, $privileges, $assert);
         }
     }
 }
コード例 #4
0
 /**
  *
  */
 public function roledataAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $role = Zupal_Roles::getInstance();
     echo $role->render_data(array());
 }