Пример #1
0
 public static function Instance()
 {
     if (self::$instance == null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Пример #2
0
 public function action_allroles_privs()
 {
     $mRoles = M_Roles::Instance();
     if ($this->isPost()) {
         $mRoles->updatePrivsAllRoles($_POST);
         $this->redirect(M_Link::ToAdminUsers('allroles_privs'));
     }
     $this->roles_with_privs = $mRoles->getRolesWithPrivs();
     $this->privs = $mRoles->allPrivs();
     // Получение пути к шаблону
     $templateName = $this->getTemplate('components/users/v_allroles_privs.php');
     // Формирование контента страницы
     $this->content = $this->Template($templateName, $this);
 }
Пример #3
0
 public function getRoles()
 {
     return M_Roles::Instance()->all();
 }