ActionContent

Package application.actions
Inheritance class ActionContent » Action » LsObject
Since 2.0
Source Code /application/classes/actions/ActionContent.class.php
Экшен обработки УРЛа вида /content/ - управление своими топиками

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
_aBehaviors Список поведений в виде готовых объектов, формируется автоматически LsObject
aBehaviors array Список поведений LsObject
aParams array Список параметров из URL Action
aParamsEventMatch array Список совпадений по регулярному выражению для евента Action
aRegisterEvent array Список зарегистрированных евентов Action
aRegisterEventExternal array Список евентов, которые нужно обрабатывать внешним обработчиком Action
oUserCurrent ModuleUser_EntityUser|null Текущий юзер ActionContent
sActionTemplate string|null Шаблон экшена Action
sCurrentAction null|string Текущий экшен Action
sCurrentEvent string|null Текущий евент Action
sCurrentEventName string|null Имя текущий евента Action
sDefaultEvent string|null Дефолтный евент Action
sMenuHeadItemSelect string Главное меню ActionContent
sMenuItemSelect string Меню ActionContent
sMenuSubItemSelect string СубМеню ActionContent

Public Methods

Hide inherited methods

MethodDescriptionDefined By
ActionCall() Позволяет запускать не публичные методы экшена через объект Action
ActionCallExists() Проверяет метод экшена на существование Action
ActionGet() Возвращает свойство объекта экшена Action
ActionSet() Устанавливает свойство объекта экшена Action
AddBehaviorHook() Добавляет хук поведения LsObject
AttachBehavior() Присоединяет поведение к объекту LsObject
DetachBehavior() Отсоединяет поведение от объекта LsObject
EventAjaxPreview() ActionContent
EventShutdown() При завершении экшена загружаем необходимые переменные ActionContent
ExecEvent() Запускает евент на выполнение Action
GetActionClass() Получить каталог с шаблонами экшена(совпадает с именем класса) Action
GetBehavior() Возвращает объект поведения по его имени LsObject
GetBehaviors() Возвращает все объекты поведения LsObject
GetCurrentEventName() Возвращает имя евента Action
GetDefaultEvent() Получает евент по умолчанию Action
GetParam() Получает параметр из URL по его номеру, если его нет то null Action
GetParams() Получает список параметров из УРЛ Action
GetTemplate() Получить шаблон Action
Init() Инициализация ActionContent
RemoveBehaviorHook() Удаляет хук поведения LsObject
RunBehaviorHook() Запускает хук поведения на выполнение LsObject
SetDefaultEvent() Устанавливает евент по умолчанию Action
SetParam() Установить значение параметра(эмуляция параметра в URL). Action
__call() Ставим хук на вызов неизвестного метода и считаем что хотели вызвать метод какого либо модуля LsObject
__clone() При клонировании сбрасываем поведения LsObject
__construct() Конструктор Action
__get() Обработка доступа к объекты поведения LsObject

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
AddEvent() Добавляет евент в экшен Action
AddEventPreg() Добавляет евент в экшен, используя регулярное выражение для евента и параметров Action
EventAdd() Добавление топика ActionContent
EventAjaxAdd() ActionContent
EventAjaxEdit() ActionContent
EventDelete() ActionContent
EventEdit() ActionContent
EventErrorDebug() Выводит отладочную информацию в стандартном сообщении Action
EventNotFound() Вызывается в том случаи если не найден евент который запросили через URL Action
EventShowTopics() Выводит список топиков ActionContent
GetEventMatch() Возвращает элементы совпадения по регулярному выражению для евента Action
GetParamEventMatch() Возвращает элементы совпадения по регулярному выражению для параметров евента Action
PrepareBehaviors() Инициализация поведений LsObject
RegisterEvent() Регистрируем евенты ActionContent
RegisterEventExternal() Регистрируем внешние обработчики для евентов Action
SetTemplate() Устанавливает какой шаблон выводить Action
SetTemplateAction() Устанавливает какой шаблон выводить Action

Property Details

oUserCurrent property
protected ModuleUser_EntityUser|null $oUserCurrent;

Текущий юзер

sMenuHeadItemSelect property
protected string $sMenuHeadItemSelect;

Главное меню

sMenuItemSelect property
protected string $sMenuItemSelect;

Меню

sMenuSubItemSelect property
protected string $sMenuSubItemSelect;

СубМеню

Method Details

EventAdd() method
protected void EventAdd()
Source Code: /application/classes/actions/ActionContent.class.php#204 (show)
protected function EventAdd()
{
    
$sTopicType $this->GetParam(0);
    if (!
$oTopicType $this->Topic_GetTopicType($sTopicType)) {
        return 
parent::EventNotFound();
    }
    
/**
     * Проверяем права на создание топика
     */
    
if (!$this->ACL_CanAddTopic($this->oUserCurrent$oTopicType)) {
        
$this->Message_AddErrorSingle($this->Rbac_GetMsgLast());
        return 
Router::Action('error');
    }
    
$this->sMenuSubItemSelect $sTopicType;
    
/**
     * Вызов хуков
     */
    
$this->Hook_Run('topic_add_show');
    
/**
     * Загружаем переменные в шаблон
     */
    
$this->Viewer_Assign('oTopicType'$oTopicType);
    
$this->Viewer_Assign('aBlogsAllow'$this->Blog_GetBlogsAllowByUser($this->oUserCurrent));
    
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic.add.title.add'));
    
$this->SetTemplateAction('add');
}

Добавление топика

EventAjaxAdd() method
protected void EventAjaxAdd()
Source Code: /application/classes/actions/ActionContent.class.php#375 (show)
protected function EventAjaxAdd()
{
    
$this->Viewer_SetResponseAjax();
    
/**
     * Проверяем тип топика
     */
    
$sTopicType getRequestStr('topic_type');
    if (!
$oTopicType $this->Topic_GetTopicType($sTopicType)) {
        return 
$this->EventErrorDebug();
    }
    
/**
     * Проверяем права на создание топика
     */
    
if (!$this->ACL_CanAddTopic($this->oUserCurrent$oTopicType)) {
        
$this->Message_AddErrorSingle($this->Rbac_GetMsgLast());
        return 
false;
    }
    
/**
     * Создаем топик
     */
    
$oTopic Engine::GetEntity('Topic');
    
$oTopic->_setDataSafe(getRequest('topic'));

    
$oTopic->setProperties(getRequest('property'));
    
$oTopic->setUserId($this->oUserCurrent->getId());
    
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
    
$oTopic->setUserIp(func_getIp());
    
$oTopic->setTopicType($sTopicType);
    if (!
$oTopic->getTags() or !$oTopic->getTypeObject()->getParam('allow_tags')) {
        
$oTopic->setTags('');
    }
    
/**
     * Публикуем или сохраняем
     */
    
if (isset($_REQUEST['submit_topic_publish'])) {
        
$oTopic->setPublish(1);
        
$oTopic->setPublishDraft(1);
    } else {
        
$oTopic->setPublish(0);
        
$oTopic->setPublishDraft(0);
    }
    
/**
     * Принудительный вывод на главную
     */
    
$oTopic->setPublishIndex(0);
    if (
$this->ACL_IsAllowPublishIndex($this->oUserCurrent)) {
        if (isset(
$_REQUEST['topic']['topic_publish_index'])) {
            
$oTopic->setPublishIndex(1);
        }
    }
    
/**
     * Запрет на комментарии к топику
     */
    
$oTopic->setForbidComment(0);
    if (isset(
$_REQUEST['topic']['topic_forbid_comment'])) {
        
$oTopic->setForbidComment(1);
    }

    if (
$oTopic->_Validate()) {
        
$oBlog $oTopic->getBlog();
        
/**
         * Проверяем права на постинг в блог
         */
        
if (!$this->ACL_IsAllowBlog($oBlog$this->oUserCurrent)) {
            
$this->Message_AddErrorSingle($this->Lang_Get('topic.add.notices.error_blog_not_allowed'),
                
$this->Lang_Get('error'));
            return 
false;
        }
        
/**
         * Получаем и устанавливаем разрезанный текст по тегу <cut>
         */
        
if ($oTopic->getTypeObject()->getParam('allow_text')) {
            list(
$sTextShort$sTextNew$sTextCut) = $this->Text_Cut($oTopic->getTextSource());
            
$oTopic->setCutText($sTextCut);
            
$oTopic->setText($this->Topic_Parser($sTextNew$oTopic));
            
$oTopic->setTextShort($this->Topic_Parser($sTextShort$oTopic));
        } else {
            
$oTopic->setCutText('');
            
$oTopic->setText('');
            
$oTopic->setTextShort('');
            
$oTopic->setTextSource('');
        }

        if (
$this->Topic_AddTopic($oTopic)) {
            
$this->Hook_Run('topic_add_after', array('oTopic' => $oTopic'oBlog' => $oBlog));
            
/**
             * Получаем топик, чтоб подцепить связанные данные
             */
            
$oTopic $this->Topic_GetTopicById($oTopic->getId());
            
/**
             * Обновляем количество топиков в блоге
             */
            
$this->Blog_RecalculateCountTopicByBlogId($oTopic->getBlogId());
            
/**
             * Фиксируем ID у media файлов топика
             */
            
$this->Media_ReplaceTargetTmpById('topic'$oTopic->getId());
            
/**
             * Фиксируем ID у опросов
             */
            
if ($oTopicType->getParam('allow_poll')) {
                
$this->Poll_ReplaceTargetTmpById('topic'$oTopic->getId());
            }
            
/**
             * Добавляем автора топика в подписчики на новые комментарии к этому топику
             */
            
$oUser $oTopic->getUser();
            if (
$oUser) {
                
$this->Subscribe_AddSubscribeSimple('topic_new_comment'$oTopic->getId(), $oUser->getMail(),
                    
$oUser->getId());
            }
            
/**
             * Делаем рассылку спама всем, кто состоит в этом блоге
             */
            
if ($oTopic->getPublish() == and $oBlog->getType() != 'personal') {
                
$this->Topic_SendNotifyTopicNew($oBlog$oTopic$oUser);
            }
            
/**
             * Добавляем событие в ленту
             */
            
$this->Stream_write($oTopic->getUserId(), 'add_topic'$oTopic->getId(),
                
$oTopic->getPublish() && $oBlog->getType() != 'close');


            
$this->Viewer_AssignAjax('sUrlRedirect'$oTopic->getUrl());
            
$this->Message_AddNotice('Добавление прошло успешно'$this->Lang_Get('attention'));
        } else {
            
$this->Message_AddError('Возникла ошибка при добавлении'$this->Lang_Get('error'));
        }
    } else {
        
$this->Message_AddError($oTopic->_getValidateError(), $this->Lang_Get('error'));
    }
}

EventAjaxEdit() method
protected void EventAjaxEdit()
Source Code: /application/classes/actions/ActionContent.class.php#231 (show)
protected function EventAjaxEdit()
{
    
$this->Viewer_SetResponseAjax();

    
$aTopicRequest getRequest('topic');
    if (!(isset(
$aTopicRequest['id']) and $oTopic $this->Topic_GetTopicById($aTopicRequest['id']))) {
        return 
$this->EventErrorDebug();
    }
    if (!
$this->Topic_IsAllowTopicType($oTopic->getType())) {
        return 
$this->EventErrorDebug();
    }
    
/**
     * Проверяем разрешено ли постить топик по времени
     */
    
if (isPost('submit_topic_publish') and !$oTopic->getPublishDraft() and !$this->ACL_CanPostTopicTime($this->oUserCurrent)) {
        
$this->Message_AddErrorSingle($this->Lang_Get('topic.add.notices.time_limit'), $this->Lang_Get('error'));
        return;
    }

    
/**
     * Если права на редактирование
     */
    
if (!$this->ACL_IsAllowEditTopic($oTopic$this->oUserCurrent)) {
        return 
$this->EventErrorDebug();
    }
    
/**
     * Сохраняем старое значение идентификатора блога
     */
    
$sBlogIdOld $oTopic->getBlogId();

    
$oTopic->_setDataSafe(getRequest('topic'));
    
$oTopic->setProperties(getRequest('property'));
    
$oTopic->setUserIp(func_getIp());
    if (!
$oTopic->getTags() or !$oTopic->getTypeObject()->getParam('allow_tags')) {
        
$oTopic->setTags('');
    }
    
/**
     * Публикуем или сохраняем в черновиках
     */
    
$bSendNotify false;
    if (isset(
$_REQUEST['submit_topic_publish'])) {
        
$oTopic->setPublish(1);
        if (
$oTopic->getPublishDraft() == 0) {
            
$oTopic->setPublishDraft(1);
            
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
            
$bSendNotify true;
        }
    } else {
        
$oTopic->setPublish(0);
    }
    
/**
     * Принудительный вывод на главную
     */
    
if ($this->ACL_IsAllowPublishIndex($this->oUserCurrent)) {
        if (isset(
$_REQUEST['topic']['topic_publish_index'])) {
            
$oTopic->setPublishIndex(1);
        } else {
            
$oTopic->setPublishIndex(0);
        }
    }
    
/**
     * Запрет на комментарии к топику
     */
    
$oTopic->setForbidComment(0);
    if (isset(
$_REQUEST['topic']['topic_forbid_comment'])) {
        
$oTopic->setForbidComment(1);
    }
    
/**
     * Дата редактирования контента
     */
    
$oTopic->setDateEditContent(date('Y-m-d H:i:s'));

    if (
$oTopic->_Validate()) {
        
$oBlog $oTopic->getBlog();
        
/**
         * Проверяем права на постинг в блог
         */
        
if (!$this->ACL_IsAllowBlog($oBlog$this->oUserCurrent)) {
            
$this->Message_AddErrorSingle($this->Lang_Get('topic.add.notices.error_blog_not_allowed'),
                
$this->Lang_Get('error'));
            return 
false;
        }
        
/**
         * Получаемый и устанавливаем разрезанный текст по тегу <cut>
         */
        
if ($oTopic->getTypeObject()->getParam('allow_text')) {
            list(
$sTextShort$sTextNew$sTextCut) = $this->Text_Cut($oTopic->getTextSource());
            
$oTopic->setCutText($sTextCut);
            
// TODO: передача параметров в Topic_Parser пока не используется - нужно заменить на этот вызов все места с парсингом топика
            
$oTopic->setText($this->Topic_Parser($sTextNew$oTopic));
            
$oTopic->setTextShort($this->Topic_Parser($sTextShort$oTopic));
        } else {
            
$oTopic->setCutText('');
            
$oTopic->setText('');
            
$oTopic->setTextShort('');
            
$oTopic->setTextSource('');
        }
        
/**
         * Сохраняем топик
         */
        
if ($this->Topic_UpdateTopic($oTopic)) {
            
$this->Hook_Run('topic_edit_after',
                array(
'oTopic' => $oTopic'oBlog' => $oBlog'bSendNotify' => &$bSendNotify));
            
/**
             * Обновляем данные в комментариях, если топик был перенесен в новый блог
             */
            
if ($sBlogIdOld != $oTopic->getBlogId()) {
                
$this->Comment_UpdateTargetParentByTargetId($oTopic->getBlogId(), 'topic'$oTopic->getId());
                
$this->Comment_UpdateTargetParentByTargetIdOnline($oTopic->getBlogId(), 'topic'$oTopic->getId());
            }
            
/**
             * Обновляем количество топиков в блоге
             */
            
if ($sBlogIdOld != $oTopic->getBlogId()) {
                
$this->Blog_RecalculateCountTopicByBlogId($sBlogIdOld);
            }
            
$this->Blog_RecalculateCountTopicByBlogId($oTopic->getBlogId());
            
/**
             * Добавляем событие в ленту
             */
            
$this->Stream_write($oTopic->getUserId(), 'add_topic'$oTopic->getId(),
                
$oTopic->getPublish() && $oBlog->getType() != 'close');
            
/**
             * Рассылаем о новом топике подписчикам блога
             */
            
if ($bSendNotify) {
                
$this->Topic_SendNotifyTopicNew($oBlog$oTopic$oTopic->getUser());
            }
            if (!
$oTopic->getPublish() and !$this->oUserCurrent->isAdministrator() and $this->oUserCurrent->getId() != $oTopic->getUserId()) {
                
$sUrlRedirect $oBlog->getUrlFull();
            } else {
                
$sUrlRedirect $oTopic->getUrl();
            }

            
$this->Viewer_AssignAjax('sUrlRedirect'$sUrlRedirect);
            
$this->Message_AddNotice('Обновление прошло успешно'$this->Lang_Get('attention'));
        } else {
            
$this->Message_AddErrorSingle($this->Lang_Get('system_error'));
        }
    } else {
        
$this->Message_AddError($oTopic->_getValidateError(), $this->Lang_Get('error'));
    }
}

EventAjaxPreview() method
public void EventAjaxPreview()
Source Code: /application/classes/actions/ActionContent.class.php#509 (show)
public function EventAjaxPreview()
{
    
/**
     * Т.к. используется обработка отправки формы, то устанавливаем тип ответа 'jsonIframe' (тот же JSON только обернутый в textarea)
     * Это позволяет избежать ошибок в некоторых браузерах, например, Opera
     */
    
$this->Viewer_SetResponseAjax('jsonIframe'false);
    
/**
     * Пользователь авторизован?
     */
    
if (!$this->oUserCurrent) {
        
$this->Message_AddErrorSingle($this->Lang_Get('need_authorization'), $this->Lang_Get('error'));
        return;
    }
    
/**
     * Допустимый тип топика?
     */
    
if (!$this->Topic_IsAllowTopicType($sType getRequestStr('topic_type'))) {
        
$this->Message_AddErrorSingle($this->Lang_Get('topic.add.notices.error_type'), $this->Lang_Get('error'));
        return;
    }
    
/**
     * Создаем объект топика для валидации данных
     */
    
$oTopic Engine::GetEntity('ModuleTopic_EntityTopic');

    
$aTopicRequest getRequest('topic');
    
$oTopic->setTitle(isset($aTopicRequest['topic_title']) ? strip_tags($aTopicRequest['topic_title']) : '');
    
$oTopic->setTextSource(isset($aTopicRequest['topic_text_source']) ? $aTopicRequest['topic_text_source'] : '');
    
$oTopic->setTags(isset($aTopicRequest['topic_tags']) ? $aTopicRequest['topic_tags'] : '');
    
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
    
$oTopic->setUserId($this->oUserCurrent->getId());
    
$oTopic->setType($sType);
    
$oTopic->setPublish(1);
    
$oTopic->setProperties(getRequest('property'));
    
/**
     * Валидируем необходимые поля топика
     */
    
$oTopic->_Validate(array('topic_title''topic_text''topic_tags''topic_type''properties'), false);
    if (
$oTopic->_hasValidateErrors()) {
        
$this->Message_AddErrorSingle($oTopic->_getValidateError());
        return 
false;
    }
    
/**
     * Аттачим дополнительные поля к топику
     */
    
$this->Property_AttachPropertiesForTarget($oTopic$oTopic->getPropertiesObject());
    
/**
     * Формируем текст топика
     */
    
list($sTextShort$sTextNew$sTextCut) = $this->Text_Cut($oTopic->getTextSource());
    
$oTopic->setCutText($sTextCut);
    
$oTopic->setText($this->Topic_Parser($sTextNew$oTopic));
    
$oTopic->setTextShort($this->Topic_Parser($sTextShort$oTopic));
    
/**
     * Рендерим шаблон для предпросмотра топика
     */
    
$oViewer $this->Viewer_GetLocalViewer();
    
$oViewer->Assign('topic'$oTopictrue);
    
$sTemplate 'components/topic/topic-preview.tpl';
    
$sTextResult $oViewer->Fetch($sTemplate);
    
/**
     * Передаем результат в ajax ответ
     */
    
$this->Viewer_AssignAjax('sText'$sTextResult);
    return 
true;
}

EventDelete() method
protected void EventDelete()
Source Code: /application/classes/actions/ActionContent.class.php#135 (show)
protected function EventDelete()
{
    
$this->Security_ValidateSendForm();
    
/**
     * Получаем номер топика из УРЛ и проверяем существует ли он
     */
    
$sTopicId $this->GetParam(0);
    if (!(
$oTopic $this->Topic_GetTopicById($sTopicId))) {
        return 
parent::EventNotFound();
    }
    
/**
     * проверяем есть ли право на удаление топика
     */
    
if (!$this->ACL_IsAllowDeleteTopic($oTopic$this->oUserCurrent)) {
        
$this->Message_AddErrorSingle($this->Rbac_GetMsgLast());
        return 
Router::Action('error');
    }
    
/**
     * Удаляем топик
     */
    
$this->Hook_Run('topic_delete_before', array('oTopic' => $oTopic));
    
$this->Topic_DeleteTopic($oTopic);
    
$this->Hook_Run('topic_delete_after', array('oTopic' => $oTopic));
    
/**
     * Перенаправляем на страницу со списком топиков из блога этого топика
     */
    
Router::Location($oTopic->getBlog()->getUrlFull());
}

EventEdit() method
protected void EventEdit()
Source Code: /application/classes/actions/ActionContent.class.php#164 (show)
protected function EventEdit()
{
    
/**
     * Получаем номер топика из УРЛ и проверяем существует ли он
     */
    
$sTopicId $this->GetParam(0);
    if (!(
$oTopic $this->Topic_GetTopicById($sTopicId))) {
        return 
parent::EventNotFound();
    }
    
/**
     * Проверяем тип топика
     */
    
if (!$oTopicType $this->Topic_GetTopicType($oTopic->getType())) {
        return 
parent::EventNotFound();
    }
    
/**
     * Если права на редактирование
     */
    
if (!$this->ACL_IsAllowEditTopic($oTopic$this->oUserCurrent)) {
        return 
parent::EventNotFound();
    }
    
/**
     * Вызов хуков
     */
    
$this->Hook_Run('topic_edit_show', array('oTopic' => $oTopic));
    
/**
     * Загружаем переменные в шаблон
     */
    
$this->Viewer_Assign('aBlogsAllow'$this->Blog_GetBlogsAllowByUser($this->oUserCurrent));
    
$this->Viewer_Assign('oTopicType'$oTopicType);
    
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic.add.title.edit'));

    
$this->Viewer_Assign('oTopicEdit'$oTopic);
    
$this->SetTemplateAction('add');
}

EventShowTopics() method
protected void EventShowTopics()
Source Code: /application/classes/actions/ActionContent.class.php#106 (show)
protected function EventShowTopics()
{
    
/**
     * Меню
     */
    
$this->sMenuSubItemSelect $this->sCurrentEvent;
    
/**
     * Передан ли номер страницы
     */
    
$iPage $this->GetParamEventMatch(02) ? $this->GetParamEventMatch(02) : 1;
    
/**
     * Получаем список топиков
     */
    
$aResult $this->Topic_GetTopicsPersonalByUser($this->oUserCurrent->getId(),
        
$this->sCurrentEvent == 'published' 0$iPageConfig::Get('module.topic.per_page'));
    
$aTopics $aResult['collection'];
    
/**
     * Формируем постраничность
     */
    
$aPaging $this->Viewer_MakePaging($aResult['count'], $iPageConfig::Get('module.topic.per_page'),
        
Config::Get('pagination.pages.count'), Router::GetPath('content') . $this->sCurrentEvent);
    
/**
     * Загружаем переменные в шаблон
     */
    
$this->Viewer_Assign('aPaging'$aPaging);
    
$this->Viewer_Assign('aTopics'$aTopics);
    
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic.nav.' $this->sCurrentEvent));
}

Выводит список топиков

EventShutdown() method
public void EventShutdown()
Source Code: /application/classes/actions/ActionContent.class.php#581 (show)
public function EventShutdown()
{
    
$this->Viewer_Assign('sMenuHeadItemSelect'$this->sMenuHeadItemSelect);
    
$this->Viewer_Assign('sMenuItemSelect'$this->sMenuItemSelect);
    
$this->Viewer_Assign('sMenuSubItemSelect'$this->sMenuSubItemSelect);
}

При завершении экшена загружаем необходимые переменные

Init() method
public void Init()
Source Code: /application/classes/actions/ActionContent.class.php#59 (show)
public function Init()
{
    
/**
     * Проверяем авторизован ли юзер
     */
    
if (!$this->User_IsAuthorization()) {
        return 
parent::EventNotFound();
    }
    
$this->oUserCurrent $this->User_GetUserCurrent();
    
/**
     * Усанавливаем дефолтный евент
     */
    
$this->SetDefaultEvent('add');
    
/**
     * Устанавливаем title страницы
     */
    
$this->Viewer_AddHtmlTitle($this->Lang_Get('topic.topics'));
}

Инициализация

RegisterEvent() method
protected void RegisterEvent()
Source Code: /application/classes/actions/ActionContent.class.php#82 (show)
protected function RegisterEvent()
{
    
$this->AddEventPreg('/^add$/i''/^[a-z_0-9]{1,50}$/i''/^$/i''EventAdd');
    
$this->AddEventPreg('/^edit$/i''/^\d{1,10}$/i''/^$/i''EventEdit');
    
$this->AddEventPreg('/^delete$/i''/^\d{1,10}$/i''/^$/i''EventDelete');

    
$this->AddEventPreg('/^published$/i''/^(page([1-9]\d{0,5}))?$/i''EventShowTopics');
    
$this->AddEventPreg('/^drafts$/i''/^(page([1-9]\d{0,5}))?$/i''EventShowTopics');

    
$this->AddEventPreg('/^ajax$/i''/^add$/i''/^$/i''EventAjaxAdd');
    
$this->AddEventPreg('/^ajax$/i''/^edit$/i''/^$/i''EventAjaxEdit');
    
$this->AddEventPreg('/^ajax$/i''/^preview$/i''/^$/i''EventAjaxPreview');
}

Регистрируем евенты