getViewPath() публичный метод

Returns the directory that contains the view files for this module.
public getViewPath ( ) : string
Результат string the root directory of view files. Defaults to "[[basePath]]/views".
Пример #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()
 {
     if ($this->_viewPath === null) {
         $this->_viewPath = $this->module->getViewPath() . DIRECTORY_SEPARATOR . $this->id;
     }
     return $this->_viewPath;
 }
Пример #2
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;
 }
Пример #3
0
 /**
  * @inheritdoc
  */
 public function getViewPath()
 {
     return defined('IS_BACKEND') ? $this->getBasePath() . DIRECTORY_SEPARATOR . 'views/_backend' : parent::getViewPath();
 }