initialize() публичный Метод

Always called by dispatcher before controller's requested method.
С версии: 2.0.0
public initialize ( )
Пример #1
0
 /**
  * Highlight route and include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->Menu->highlightRoute('/messages/inbox');
     $this->setData('Breadcrumbs', array(array('Name' => t('Inbox'), 'Url' => '/messages/inbox')));
     $this->addModule('SignedInModule');
     if (checkPermission('Conversations.Conversations.Add')) {
         $this->addModule('NewConversationModule');
     }
 }
Пример #2
0
 /**
  * Highlight route and include JS, CSS, and modules used by all methods.
  *
  * Always called by dispatcher before controller's requested method.
  *
  * @since 2.0.0
  * @access public
  */
 public function initialize()
 {
     parent::initialize();
     $this->Menu->highlightRoute('/messages/inbox');
     $this->setData('Breadcrumbs', array(array('Name' => t('Inbox'), 'Url' => '/messages/inbox')));
     //      $this->addModule('MeModule');
     $this->addModule('SignedInModule');
     // Spoilers assets
     $this->addJsFile('spoilers.js', 'dashboard');
     $this->addCssFile('spoilers.css', 'dashboard');
     $this->addDefinition('Spoiler', t('Spoiler'));
     $this->addDefinition('show', t('show'));
     $this->addDefinition('hide', t('hide'));
     if (checkPermission('Conversations.Conversations.Add')) {
         $this->addModule('NewConversationModule');
     }
 }