This commit is contained in:
resurtm
2016-12-21 14:01:59 +06:00
parent f66689ef49
commit a3434504e6
5 changed files with 16 additions and 9 deletions

View File

View File

@ -46,6 +46,9 @@ feature. This is good approach too:
],
```
> Please note, the method above works only starting from Yii 2.0.10 and upper. In version 2.0.9 and lower you can
> use explicit calls to DI container from application `bootstrap.php` file.
Finally you can now add new methods, properties, and other things to your new `User` model class:
```php

View File

@ -9,17 +9,15 @@
* the LICENSE file that was distributed with this source code.
*/
use Da\User\Search\UserSearch;
use yii\data\ActiveDataProvider;
use yii\grid\GridView;
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\Pjax;
/*
* @var View $this
* @var ActiveDataProvider $dataProvider
* @var UserSearch $searchModel
/**
* @var $this yii\web\View
* @var $dataProvider yii\data\ActiveDataProvider
* @var $searchModel Da\User\Search\UserSearch
*/
$this->title = Yii::t('user', 'Manage users');

View File

@ -11,8 +11,8 @@
use yii\bootstrap\Alert;
/*
* @var \Da\User\Module $module
/**
* @var $module Da\User\Module
*/
?>
@ -20,7 +20,7 @@ use yii\bootstrap\Alert;
<div class="row">
<div class="col-xs-12">
<?php foreach (Yii::$app->session->getAllFlashes() as $type => $message): ?>
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'])): ?>
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'], true)): ?>
<?= Alert::widget([
'options' => ['class' => 'alert-dismissible alert-'.$type],
'body' => $message,

View File

@ -11,14 +11,20 @@
use yii\helpers\Html;
/**
* @var $content string
*/
?>
<div class="clearfix"></div>
<?= $this->render(
'/shared/_alert',
[
'module' => Yii::$app->getModule('user'),
]
) ?>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">