library/core/class.controller.php
public function Initialize() {
      if (in_array($this->SyndicationMethod, array(SYNDICATION_ATOM, SYNDICATION_RSS))) {
         $this->_Headers['Content-Type'] = 'text/xml; charset='.C('Garden.Charset', '');
      }
      
      if (is_object($this->Menu))
         $this->Menu->Sort = Gdn::Config('Garden.Menu.Sort');
      
      $ResolvedPath = strtolower(CombinePaths(array(Gdn::Dispatcher()->Application(), Gdn::Dispatcher()->ControllerName, Gdn::Dispatcher()->ControllerMethod)));
      $this->ResolvedPath = $ResolvedPath;
      
      $this->FireEvent('Initialize');
   }
public function Initialize() {
      if (in_array($this->SyndicationMethod, array(SYNDICATION_ATOM, SYNDICATION_RSS))) {
         $this->_Headers['Content-Type'] = 'text/xml; charset='.C('Garden.Charset', '');
      }
      
      if (is_object($this->Menu))
         $this->Menu->Sort = Gdn::Config('Garden.Menu.Sort');
      
      $ResolvedPath = strtolower(CombinePaths(array(Gdn::Dispatcher()->Application(), Gdn::Dispatcher()->ControllerName, Gdn::Dispatcher()->ControllerMethod)));
      $this->ResolvedPath = $ResolvedPath;
      
      $this->FireEvent('Initialize');
   }
public function Initialize ( ) { if ( in_array ( $ this -> SyndicationMethod , array ( SYNDICATION_ATOM , SYNDICATION_RSS ) ) ) { $ this -> _Headers [ 'Content-Type' ] = 'text/xml; charset=' . C ( 'Garden.Charset' , '' ) ; } if ( is_object ( $ this -> Menu ) ) $ this -> Menu -> Sort = Gdn :: Config ( 'Garden.Menu.Sort' ) ; $ ResolvedPath = strtolower ( CombinePaths ( array ( Gdn :: Dispatcher ( ) -> Application ( ) , Gdn :: Dispatcher ( ) -> ControllerName , Gdn :: Dispatcher ( ) -> ControllerMethod ) ) ) ; $ this -> ResolvedPath = $ ResolvedPath ; $ this -> FireEvent ( 'Initialize' ) ; }
The initialize method is called by the dispatcher after the constructor
has completed, objects have been passed along, assets have been
retrieved, and before the requested method fires. Use it in any extended
controller to do things like loading script and CSS into the head.
The initialize method is called by the dispatcher after the constructor has completed objects have been passed along assets have been retrieved and before the requested method fires . Use it in any extended controller to do things like loading script and CSS into the head .