Commit 927e9ddd by Alexander Makarov

Refactored View

parent 74620754
...@@ -6,7 +6,7 @@ use yii\bootstrap\NavBar; ...@@ -6,7 +6,7 @@ use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs; use yii\widgets\Breadcrumbs;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
*/ */
AppAsset::register($this); AppAsset::register($this);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var string $name * @var string $name
* @var string $message * @var string $message
* @var Exception $exception * @var Exception $exception
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
$this->title = 'My Yii Application'; $this->title = 'My Yii Application';
?> ?>
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var app\models\LoginForm $model * @var app\models\LoginForm $model
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var common\models\User $user; * @var common\models\User $user;
*/ */
......
...@@ -7,7 +7,7 @@ use yii\widgets\Breadcrumbs; ...@@ -7,7 +7,7 @@ use yii\widgets\Breadcrumbs;
use frontend\widgets\Alert; use frontend\widgets\Alert;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
*/ */
AppAsset::register($this); AppAsset::register($this);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
$this->title = 'About'; $this->title = 'About';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
......
...@@ -4,7 +4,7 @@ use yii\widgets\ActiveForm; ...@@ -4,7 +4,7 @@ use yii\widgets\ActiveForm;
use yii\captcha\Captcha; use yii\captcha\Captcha;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var app\models\ContactForm $model * @var app\models\ContactForm $model
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var string $name * @var string $name
* @var string $message * @var string $message
* @var Exception $exception * @var Exception $exception
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
$this->title = 'My Yii Application'; $this->title = 'My Yii Application';
?> ?>
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var app\models\LoginForm $model * @var app\models\LoginForm $model
*/ */
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var common\models\User $model * @var common\models\User $model
*/ */
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var common\models\User $model * @var common\models\User $model
*/ */
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var common\models\User $model * @var common\models\User $model
*/ */
......
...@@ -5,7 +5,7 @@ use yii\bootstrap\NavBar; ...@@ -5,7 +5,7 @@ use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs; use yii\widgets\Breadcrumbs;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
*/ */
app\config\AppAsset::register($this); app\config\AppAsset::register($this);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
$this->title = 'About'; $this->title = 'About';
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
......
...@@ -4,7 +4,7 @@ use yii\widgets\ActiveForm; ...@@ -4,7 +4,7 @@ use yii\widgets\ActiveForm;
use yii\captcha\Captcha; use yii\captcha\Captcha;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var app\models\ContactForm $model * @var app\models\ContactForm $model
*/ */
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var string $name * @var string $name
* @var string $message * @var string $message
* @var Exception $exception * @var Exception $exception
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
$this->title = 'My Yii Application'; $this->title = 'My Yii Application';
?> ?>
......
...@@ -3,7 +3,7 @@ use yii\helpers\Html; ...@@ -3,7 +3,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var app\models\LoginForm $model * @var app\models\LoginForm $model
*/ */
......
...@@ -10,7 +10,7 @@ a custom template engines by reconfiguring this component's behavior: ...@@ -10,7 +10,7 @@ a custom template engines by reconfiguring this component's behavior:
[ [
'components' => [ 'components' => [
'view' => [ 'view' => [
'class' => 'yii\base\View', 'class' => 'yii\web\View',
'renderers' => [ 'renderers' => [
'tpl' => [ 'tpl' => [
'class' => 'yii\renderers\SmartyViewRenderer', 'class' => 'yii\renderers\SmartyViewRenderer',
......
...@@ -113,7 +113,7 @@ to learn more refer to [Using template engines](template.md) section of the guid ...@@ -113,7 +113,7 @@ to learn more refer to [Using template engines](template.md) section of the guid
Using View object in templates Using View object in templates
------------------------------ ------------------------------
An instance of `yii\base\View` component is available in view templates as `$this` variable. Using it in templates you An instance of `yii\web\View` component is available in view templates as `$this` variable. Using it in templates you
can do many useful things including setting page title and meta, registering scripts and accessing the context. can do many useful things including setting page title and meta, registering scripts and accessing the context.
### Setting page title ### Setting page title
...@@ -342,7 +342,7 @@ Customizing View component ...@@ -342,7 +342,7 @@ Customizing View component
-------------------------- --------------------------
Since view is also an application component named `view` you can replace it with your own component that extends Since view is also an application component named `view` you can replace it with your own component that extends
from `yii\base\View`. It can be done via application configuration file such as `config/web.php`: from `yii\base\View` or `yii\web\View`. It can be done via application configuration file such as `config/web.php`:
```php ```php
return [ return [
......
...@@ -9,7 +9,7 @@ namespace yii\debug; ...@@ -9,7 +9,7 @@ namespace yii\debug;
use Yii; use Yii;
use yii\base\Application; use yii\base\Application;
use yii\base\View; use yii\web\View;
use yii\web\HttpException; use yii\web\HttpException;
/** /**
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var \yii\base\View $this * @var \yii\web\View $this
* @var array $manifest * @var array $manifest
*/ */
......
<?php <?php
/** /**
* @var \yii\base\View $this * @var \yii\web\View $this
* @var \yii\debug\Panel[] $panels * @var \yii\debug\Panel[] $panels
* @var string $tag * @var string $tag
*/ */
......
...@@ -5,7 +5,7 @@ use yii\bootstrap\ButtonGroup; ...@@ -5,7 +5,7 @@ use yii\bootstrap\ButtonGroup;
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var \yii\base\View $this * @var \yii\web\View $this
* @var array $summary * @var array $summary
* @var string $tag * @var string $tag
* @var array $manifest * @var array $manifest
......
<?php <?php
/** /**
* @var \yii\base\View $this * @var \yii\web\View $this
* @var string $content * @var string $content
*/ */
use yii\helpers\Html; use yii\helpers\Html;
......
...@@ -11,7 +11,7 @@ use Yii; ...@@ -11,7 +11,7 @@ use Yii;
use ReflectionClass; use ReflectionClass;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\base\Model; use yii\base\Model;
use yii\base\View; use yii\web\View;
/** /**
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var yii\gii\generators\controller\Generator $generator * @var yii\gii\generators\controller\Generator $generator
*/ */
......
...@@ -5,7 +5,7 @@ use yii\helpers\Inflector; ...@@ -5,7 +5,7 @@ use yii\helpers\Inflector;
/** /**
* This is the template for generating a controller class file. * This is the template for generating a controller class file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\controller\Generator $generator * @var yii\gii\generators\controller\Generator $generator
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* This is the template for generating an action view file. * This is the template for generating an action view file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\controller\Generator $generator * @var yii\gii\generators\controller\Generator $generator
* @var string $action the action ID * @var string $action the action ID
*/ */
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
echo "<?php\n"; echo "<?php\n";
?> ?>
/** /**
* @var yii\base\View $this * @var yii\web\View $this
*/ */
<?= "?>" ?> <?= "?>" ?>
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
......
...@@ -5,7 +5,7 @@ use yii\helpers\StringHelper; ...@@ -5,7 +5,7 @@ use yii\helpers\StringHelper;
/** /**
* This is the template for generating a CRUD controller class file. * This is the template for generating a CRUD controller class file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
......
...@@ -5,7 +5,7 @@ use yii\helpers\StringHelper; ...@@ -5,7 +5,7 @@ use yii\helpers\StringHelper;
/** /**
* This is the template for generating a CRUD controller class file. * This is the template for generating a CRUD controller class file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -22,7 +22,7 @@ use yii\helpers\Html; ...@@ -22,7 +22,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= ltrim($generator->modelClass, '\\') ?> $model * @var <?= ltrim($generator->modelClass, '\\') ?> $model
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -15,7 +15,7 @@ use yii\helpers\Html; ...@@ -15,7 +15,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= ltrim($generator->searchModelClass, '\\') ?> $model * @var <?= ltrim($generator->searchModelClass, '\\') ?> $model
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -14,7 +14,7 @@ echo "<?php\n"; ...@@ -14,7 +14,7 @@ echo "<?php\n";
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= ltrim($generator->modelClass, '\\') ?> $model * @var <?= ltrim($generator->modelClass, '\\') ?> $model
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -18,7 +18,7 @@ use yii\helpers\Html; ...@@ -18,7 +18,7 @@ use yii\helpers\Html;
use <?= $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\widgets\\ListView" ?>; use <?= $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\widgets\\ListView" ?>;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\data\ActiveDataProvider $dataProvider * @var yii\data\ActiveDataProvider $dataProvider
* @var <?= ltrim($generator->searchModelClass, '\\') ?> $searchModel * @var <?= ltrim($generator->searchModelClass, '\\') ?> $searchModel
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -16,7 +16,7 @@ echo "<?php\n"; ...@@ -16,7 +16,7 @@ echo "<?php\n";
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= ltrim($generator->modelClass, '\\') ?> $model * @var <?= ltrim($generator->modelClass, '\\') ?> $model
*/ */
......
...@@ -4,7 +4,7 @@ use yii\helpers\Inflector; ...@@ -4,7 +4,7 @@ use yii\helpers\Inflector;
use yii\helpers\StringHelper; use yii\helpers\StringHelper;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\crud\Generator $generator * @var yii\gii\generators\crud\Generator $generator
*/ */
...@@ -17,7 +17,7 @@ use yii\helpers\Html; ...@@ -17,7 +17,7 @@ use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= ltrim($generator->modelClass, '\\') ?> $model * @var <?= ltrim($generator->modelClass, '\\') ?> $model
*/ */
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var yii\gii\generators\form\Generator $generator * @var yii\gii\generators\form\Generator $generator
*/ */
......
...@@ -5,7 +5,7 @@ use yii\helpers\Inflector; ...@@ -5,7 +5,7 @@ use yii\helpers\Inflector;
/** /**
* This is the template for generating an action view file. * This is the template for generating an action view file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\form\Generator $generator * @var yii\gii\generators\form\Generator $generator
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* This is the template for generating an action view file. * This is the template for generating an action view file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\form\Generator $generator * @var yii\gii\generators\form\Generator $generator
*/ */
...@@ -13,7 +13,7 @@ use yii\helpers\Html; ...@@ -13,7 +13,7 @@ use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var <?= $generator->modelClass ?> $model * @var <?= $generator->modelClass ?> $model
* @var ActiveForm $form * @var ActiveForm $form
*/ */
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var yii\gii\generators\form\Generator $generator * @var yii\gii\generators\form\Generator $generator
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* This is the template for generating the model class of a specified table. * This is the template for generating the model class of a specified table.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\model\Generator $generator * @var yii\gii\generators\model\Generator $generator
* @var string $tableName full table name * @var string $tableName full table name
* @var string $className class name * @var string $className class name
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
* @var yii\gii\generators\module\Generator $generator * @var yii\gii\generators\module\Generator $generator
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* This is the template for generating a controller class within a module. * This is the template for generating a controller class within a module.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\module\Generator $generator * @var yii\gii\generators\module\Generator $generator
*/ */
echo "<?php\n"; echo "<?php\n";
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* This is the template for generating a module class file. * This is the template for generating a module class file.
* *
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\module\Generator $generator * @var yii\gii\generators\module\Generator $generator
*/ */
$className = $generator->moduleClass; $className = $generator->moduleClass;
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\generators\module\Generator $generator * @var yii\gii\generators\module\Generator $generator
*/ */
?> ?>
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var mixed $diff * @var mixed $diff
*/ */
?> ?>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
* @var yii\gii\Generator[] $generators * @var yii\gii\Generator[] $generators
* @var yii\gii\Generator $activeGenerator * @var yii\gii\Generator $activeGenerator
......
...@@ -6,7 +6,7 @@ use yii\gii\components\ActiveField; ...@@ -6,7 +6,7 @@ use yii\gii\components\ActiveField;
use yii\gii\CodeFile; use yii\gii\CodeFile;
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\Generator $generator * @var yii\gii\Generator $generator
* @var string $id * @var string $id
* @var yii\widgets\ActiveForm $form * @var yii\widgets\ActiveForm $form
......
...@@ -4,7 +4,7 @@ use yii\helpers\Html; ...@@ -4,7 +4,7 @@ use yii\helpers\Html;
use yii\gii\CodeFile; use yii\gii\CodeFile;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $generator \yii\gii\Generator * @var $generator \yii\gii\Generator
* @var CodeFile[] $files * @var CodeFile[] $files
* @var array $answers * @var array $answers
......
<?php <?php
/** /**
* @var yii\base\View $this * @var yii\web\View $this
* @var yii\gii\Generator $generator * @var yii\gii\Generator $generator
* @var string $results * @var string $results
* @var boolean $hasError * @var boolean $hasError
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
* @var yii\gii\Generator[] $generators * @var yii\gii\Generator[] $generators
* @var yii\gii\Generator $activeGenerator * @var yii\gii\Generator $activeGenerator
......
...@@ -4,7 +4,7 @@ use yii\bootstrap\Nav; ...@@ -4,7 +4,7 @@ use yii\bootstrap\Nav;
use yii\helpers\Html; use yii\helpers\Html;
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
*/ */
$asset = yii\gii\GiiAsset::register($this); $asset = yii\gii\GiiAsset::register($this);
......
...@@ -471,7 +471,7 @@ abstract class Application extends Module ...@@ -471,7 +471,7 @@ abstract class Application extends Module
'formatter' => ['class' => 'yii\base\Formatter'], 'formatter' => ['class' => 'yii\base\Formatter'],
'i18n' => ['class' => 'yii\i18n\I18N'], 'i18n' => ['class' => 'yii\i18n\I18N'],
'urlManager' => ['class' => 'yii\web\UrlManager'], 'urlManager' => ['class' => 'yii\web\UrlManager'],
'view' => ['class' => 'yii\base\View'], 'view' => ['class' => 'yii\web\View'],
]); ]);
} }
......
...@@ -96,7 +96,7 @@ class CaptchaValidator extends Validator ...@@ -96,7 +96,7 @@ class CaptchaValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -213,6 +213,7 @@ return [ ...@@ -213,6 +213,7 @@ return [
'yii\web\User' => YII_PATH . '/web/User.php', 'yii\web\User' => YII_PATH . '/web/User.php',
'yii\web\UserEvent' => YII_PATH . '/web/UserEvent.php', 'yii\web\UserEvent' => YII_PATH . '/web/UserEvent.php',
'yii\web\VerbFilter' => YII_PATH . '/web/VerbFilter.php', 'yii\web\VerbFilter' => YII_PATH . '/web/VerbFilter.php',
'yii\web\View' => YII_PATH . '/web/View.php',
'yii\web\XmlResponseFormatter' => YII_PATH . '/web/XmlResponseFormatter.php', 'yii\web\XmlResponseFormatter' => YII_PATH . '/web/XmlResponseFormatter.php',
'yii\web\YiiAsset' => YII_PATH . '/web/YiiAsset.php', 'yii\web\YiiAsset' => YII_PATH . '/web/YiiAsset.php',
'yii\widgets\ActiveField' => YII_PATH . '/widgets/ActiveField.php', 'yii\widgets\ActiveField' => YII_PATH . '/widgets/ActiveField.php',
......
...@@ -79,7 +79,7 @@ class BooleanValidator extends Validator ...@@ -79,7 +79,7 @@ class BooleanValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -179,7 +179,7 @@ class CompareValidator extends Validator ...@@ -179,7 +179,7 @@ class CompareValidator extends Validator
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated * @param string $attribute the name of the attribute to be validated
* @return string the client-side validation script * @return string the client-side validation script
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @throws InvalidConfigException if CompareValidator::operator is invalid * @throws InvalidConfigException if CompareValidator::operator is invalid
*/ */
......
...@@ -119,7 +119,7 @@ class EmailValidator extends Validator ...@@ -119,7 +119,7 @@ class EmailValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -79,7 +79,7 @@ class InlineValidator extends Validator ...@@ -79,7 +79,7 @@ class InlineValidator extends Validator
* *
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. Null if the validator does not support * @return string the client-side validation script. Null if the validator does not support
* client-side validation. * client-side validation.
......
...@@ -114,7 +114,7 @@ class NumberValidator extends Validator ...@@ -114,7 +114,7 @@ class NumberValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -81,7 +81,7 @@ class RangeValidator extends Validator ...@@ -81,7 +81,7 @@ class RangeValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -78,7 +78,7 @@ class RegularExpressionValidator extends Validator ...@@ -78,7 +78,7 @@ class RegularExpressionValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -102,7 +102,7 @@ class RequiredValidator extends Validator ...@@ -102,7 +102,7 @@ class RequiredValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -142,7 +142,7 @@ class StringValidator extends Validator ...@@ -142,7 +142,7 @@ class StringValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
*/ */
......
...@@ -115,7 +115,7 @@ class UrlValidator extends Validator ...@@ -115,7 +115,7 @@ class UrlValidator extends Validator
* Returns the JavaScript needed for performing client-side validation. * Returns the JavaScript needed for performing client-side validation.
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. * @return string the client-side validation script.
* @see \yii\Web\ActiveForm::enableClientValidation * @see \yii\Web\ActiveForm::enableClientValidation
......
...@@ -215,7 +215,7 @@ abstract class Validator extends Component ...@@ -215,7 +215,7 @@ abstract class Validator extends Component
* *
* @param \yii\base\Model $object the data object being validated * @param \yii\base\Model $object the data object being validated
* @param string $attribute the name of the attribute to be validated. * @param string $attribute the name of the attribute to be validated.
* @param \yii\base\View $view the view object that is going to be used to render views or view files * @param \yii\web\View $view the view object that is going to be used to render views or view files
* containing a model form with this validator applied. * containing a model form with this validator applied.
* @return string the client-side validation script. Null if the validator does not support * @return string the client-side validation script. Null if the validator does not support
* client-side validation. * client-side validation.
......
...@@ -10,7 +10,7 @@ namespace yii\web; ...@@ -10,7 +10,7 @@ namespace yii\web;
use Yii; use Yii;
use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\base\Object; use yii\base\Object;
use yii\base\View; use yii\web\View;
/** /**
* AssetBundle represents a collection of asset files, such as CSS, JS, images. * AssetBundle represents a collection of asset files, such as CSS, JS, images.
...@@ -97,12 +97,12 @@ class AssetBundle extends Object ...@@ -97,12 +97,12 @@ class AssetBundle extends Object
*/ */
public $css = []; public $css = [];
/** /**
* @var array the options that will be passed to [[\yii\base\View::registerJsFile()]] * @var array the options that will be passed to [[\yii\web\View::registerJsFile()]]
* when registering the JS files in this bundle. * when registering the JS files in this bundle.
*/ */
public $jsOptions = []; public $jsOptions = [];
/** /**
* @var array the options that will be passed to [[\yii\base\View::registerCssFile()]] * @var array the options that will be passed to [[\yii\web\View::registerCssFile()]]
* when registering the CSS files in this bundle. * when registering the CSS files in this bundle.
*/ */
public $cssOptions = []; public $cssOptions = [];
...@@ -140,7 +140,7 @@ class AssetBundle extends Object ...@@ -140,7 +140,7 @@ class AssetBundle extends Object
/** /**
* Registers the CSS and JS files with the given view. * Registers the CSS and JS files with the given view.
* @param \yii\base\View $view the view that the asset files are to be registered with. * @param \yii\web\View $view the view that the asset files are to be registered with.
*/ */
public function registerAssetFiles($view) public function registerAssetFiles($view)
{ {
......
<?php <?php
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
* @var $content string * @var $content string
*/ */
?> ?>
......
<?php <?php
/** /**
* @var $this \yii\base\View * @var $this \yii\web\View
*/ */
?><?php $this->beginPage(); ?>1<?php $this->head(); ?>2<?php $this->beginBody(); ?>3<?php $this->endBody(); ?>4<?php $this->endPage(); ?> ?><?php $this->beginPage(); ?>1<?php $this->head(); ?>2<?php $this->beginBody(); ?>3<?php $this->endBody(); ?>4<?php $this->endPage(); ?>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yiiunit\framework\web; namespace yiiunit\framework\web;
use Yii; use Yii;
use yii\base\View; use yii\web\View;
use yii\web\AssetBundle; use yii\web\AssetBundle;
use yii\web\AssetManager; use yii\web\AssetManager;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment