Ejemplo n.º 1
0
 /**
  * Returns the directory containing view files for this controller.
  * The default implementation returns the directory named as controller [[id]] under the [[module]]'s
  * [[viewPath]] directory.
  *
  * @return string the directory containing the view files for this controller.
  */
 public function getViewPath()
 {
     return $this->module->getViewPath() . DIRECTORY_SEPARATOR . $this->id;
 }
Ejemplo n.º 2
0
 /**
  * Sets the root directory of the application and the @app alias.
  * This method can only be invoked at the beginning of the constructor.
  *
  * @param string $path the root directory of the application.
  * @property string the root directory of the application.
  * @throws InvalidParamException if the directory does not exist.
  */
 public function setBasePath($path)
 {
     parent::setBasePath($path);
     Leaps::setAlias('@app', $this->getBasePath());
 }