Interface yii\base\ViewContextInterface

Implemented byyii\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/yiisoft/yii2/blob/master/framework/base/ViewContextInterface.php

ViewContextInterface 是想要支持相对视图名称的类应实现的接口.

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

方法详情

getViewPath() public abstract 方法

public abstract string getViewPath ( )
return string

可以以相对视图名称为前缀的视图路径.