Пример #1
0
 /**
  * Initializes the application component.
  * This method overrides the parent implementation by preprocessing
  * the user request data.
  */
 public function init()
 {
     parent::init();
     if ($this->basePath === null) {
         $this->basePath = Yii::getPathOfAlias('application.messages');
     }
 }
Пример #2
0
 /**
  * Constructor
  * Sets the default basePath to webroot.themes.{{themename}}
  */
 public function init()
 {
     Yii::app()->language = Cii::setApplicationLanguage();
     parent::init();
     if (isset(Yii::app()->theme) && isset(Yii::app()->theme->name)) {
         $this->basePath = Yii::getPathOfAlias('base.themes.' . Yii::app()->theme->name . '.messages');
     } else {
         if (isset(Yii::app()->controller->module->id)) {
             $this->basePath = Yii::getPathOfAlias('application.modules.' . Yii::app()->controller->module->id);
         } else {
             $this->basePath = Yii::getPathOfAlias('application.modules.install');
         }
     }
 }
Пример #3
0
 /**
  *
  */
 public function init()
 {
     $this->basePath = craft()->path->getFrameworkPath() . 'messages/';
     parent::init();
 }
Пример #4
0
 /**
  * Initializes the application component.
  * This method overrides the parent implementation by preprocessing
  * the user request data.
  */
 public function init()
 {
     $this->basePath = Yii::getPathOfAlias('common.messages');
     parent::init();
 }