getViewPath() public method

The default implementation returns the 'views' subdirectory under the directory containing the widget class file.
public getViewPath ( ) : string
return string the directory containing the view files for this widget.
コード例 #1
0
ファイル: Widget.php プロジェクト: cmsgears/module-core
 /**
  * The method returns the view path for this widget if set while calling widget. 
  */
 public function getViewPath()
 {
     if (isset($this->templateDir)) {
         return $this->templateDir;
     }
     return parent::getViewPath();
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function getViewPath()
 {
     if (empty($this->theme)) {
         return parent::getViewPath();
     } else {
         return \Yii::$app->getViewPath() . DIRECTORY_SEPARATOR . $this->theme;
     }
 }
コード例 #3
0
 /**
  * @inheritdoc
  */
 public function getViewPath()
 {
     return empty($this->theme) ? parent::getViewPath() : \Yii::$app->getViewPath() . DIRECTORY_SEPARATOR . $this->theme;
 }
コード例 #4
0
ファイル: IndexPage.php プロジェクト: hiqdev/hipanel-core
 public function getViewPath()
 {
     return parent::getViewPath() . DIRECTORY_SEPARATOR . (new \ReflectionClass($this))->getShortName();
 }