/** * Инициализация * */ public function Init() { $this->oMapperTopic = $this->oMapper = E::GetMapper(__CLASS__); $this->oUserCurrent = E::ModuleUser()->GetUserCurrent(); $this->aTopicTypesObjects = $this->getContentTypes(array('content_active' => 1)); $this->aTopicTypes = array_keys($this->aTopicTypesObjects); }
/** * Инициализация * */ public function Init() { $this->oMapper = E::GetMapper(__CLASS__); $this->oUserCurrent = E::ModuleUser()->GetUserCurrent(); // LS-compatible $this->oMapperBlog = $this->oMapper; }
/** * Инициализация модуля * Создаём локальный экземпляр модуля Viewer * Момент довольно спорный, но позволяет избавить основной шаблон от мусора уведомлений * */ public function Init() { $this->oViewerLocal = E::ModuleViewer()->GetLocalViewer(); $this->oMapper = E::GetMapper(__CLASS__); $this->sDir = Config::Get('module.notify.dir'); $this->sPrefix = Config::Get('module.notify.prefix'); }
/** * Инициализация * */ public function Init() { $this->oMapper = E::GetMapper(__CLASS__); // * Проверяем есть ли у юзера сессия, т.е. залогинен или нет $iUserId = intval(E::ModuleSession()->Get('user_id')); if ($iUserId && ($oUser = $this->GetUserById($iUserId)) && $oUser->getActivate()) { if ($this->oSession = $oUser->getCurrentSession()) { if ($this->oSession->GetSessionExit()) { // Сессия была закрыта $this->Logout(); return; } $this->oUserCurrent = $oUser; } } // Если сессия оборвалась по таймауту (не сам пользователь ее завершил), // то пытаемся автоматически авторизоваться if (!$this->oUserCurrent) { $this->AutoLogin(); } // * Обновляем сессию if (isset($this->oSession)) { $this->UpdateSession(); } }
/** * Инициализация модуля */ public function Init() { $this->oMapper = E::GetMapper(__CLASS__); }
/** * Инициализация * */ public function Init() { $this->oMapper = E::GetMapper(__CLASS__); $this->oUserCurrent = E::ModuleUser()->GetUserCurrent(); }