没有命名空间的类 yii yii\base yii\behaviors yii\caching yii\captcha yii\console yii\console\controllers yii\console\widgets yii\data yii\db yii\db\conditions yii\db\cubrid yii\db\cubrid\conditions yii\db\mssql yii\db\mssql\conditions yii\db\mysql yii\db\oci yii\db\oci\conditions yii\db\pgsql yii\db\sqlite yii\db\sqlite\conditions yii\di yii\filters yii\filters\auth yii\grid yii\helpers yii\i18n yii\log yii\mail yii\mutex yii\rbac yii\rest yii\test yii\validators yii\web yii\widgets

Interface yii\base\ViewContextInterface

实现yii\base\Controller, yii\base\Widget, yii\captcha\Captcha, yii\console\Controller, yii\console\controllers\AssetController, yii\console\controllers\BaseMigrateController, yii\console\controllers\CacheController, yii\console\controllers\FixtureController, yii\console\controllers\HelpController, yii\console\controllers\MessageController, yii\console\controllers\MigrateController, yii\console\controllers\ServeController, yii\console\widgets\Table, yii\grid\GridView, yii\mail\BaseMailer, yii\rest\ActiveController, yii\rest\Controller, yii\web\Controller, yii\widgets\ActiveForm, yii\widgets\BaseListView, yii\widgets\Block, yii\widgets\Breadcrumbs, yii\widgets\ContentDecorator, yii\widgets\DetailView, yii\widgets\FragmentCache, yii\widgets\InputWidget, yii\widgets\LinkPager, yii\widgets\LinkSorter, yii\widgets\ListView, yii\widgets\MaskedInput, yii\widgets\Menu, yii\widgets\Pjax, yii\widgets\Spaceless
可用版本自2.0
源码 https://github.com/yiichina/yii2/blob/api/framework/base/ViewContextInterface.php

ViewContextInterface 是应该由希望支持相对视图名称的类实现的接口。

应该实现方法 getViewPath() 以返回可以作为相对视图名称前缀的视图路径。

公共方法

隐藏继承的方法

方法描述被定义在
getViewPath() yii\base\ViewContextInterface

方法详情

getViewPath() 公共 抽象 方法

public abstract string getViewPath()
return string

可以为相对视图名称添加前缀的视图路径。