public static function Instance() { if (self::$instance == null) { self::$instance = new self(); } return self::$instance; }
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); }
public function getRoles() { return M_Roles::Instance()->all(); }