Commit 470b0c23 by jomon

code review changes

parent 9ee19cd3
...@@ -9,13 +9,13 @@ use yii\helpers\Html; ...@@ -9,13 +9,13 @@ use yii\helpers\Html;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Yii::$app->charset ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" />
<title><?php echo Html::encode($this->title) ?></title> <title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?> <?php $this->head() ?>
</head> </head>
<body> <body>
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?php echo $content ?> <?= $content ?>
<?php $this->endBody() ?> <?php $this->endBody() ?>
</body> </body>
</html> </html>
......
...@@ -12,19 +12,19 @@ use yii\bootstrap\ActiveForm; ...@@ -12,19 +12,19 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'id')->textInput(['disabled'=>!$model->isNewRecord]) ?> <?= $form->field($model, 'id')->textInput(['disabled'=>!$model->isNewRecord]) ?>
<?php if (!$model->isNewRecord): ?> <?php if (!$model->isNewRecord): ?>
<?php echo $form->field($model, 'category')->textInput(['disabled'=>true]) ?> <?= $form->field($model, 'category')->textInput(['disabled'=>true]) ?>
<?php echo $form->field($model, 'sourceMessage')->textInput(['disabled'=>true]) ?> <?= $form->field($model, 'sourceMessage')->textInput(['disabled'=>true]) ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->field($model, 'language')->textInput(['maxlength' => 16]) ?> <?= $form->field($model, 'language')->textInput(['maxlength' => 16]) ?>
<?php echo $form->field($model, 'translation')->textarea(['rows' => 6]) ?> <?= $form->field($model, 'translation')->textarea(['rows' => 6]) ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'language') ?> <?= $form->field($model, 'language') ?>
<?php echo $form->field($model, 'translation') ?> <?= $form->field($model, 'translation') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="i18n-message-create"> <div class="i18n-message-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php //echo $this->render('_search', ['model' => $searchModel]); ?> <?php //echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'I18n Message', 'modelClass' => 'I18n Message',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="i18n-message-update"> <div class="i18n-message-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -12,12 +12,12 @@ use yii\bootstrap\ActiveForm; ...@@ -12,12 +12,12 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'category')->textInput(['maxlength' => 32]) ?> <?= $form->field($model, 'category')->textInput(['maxlength' => 32]) ?>
<?php echo $form->field($model, 'message')->textarea(['rows' => 6]) ?> <?= $form->field($model, 'message')->textarea(['rows' => 6]) ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'category') ?> <?= $form->field($model, 'category') ?>
<?php echo $form->field($model, 'message') ?> <?= $form->field($model, 'message') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="i18n-source-message-create"> <div class="i18n-source-message-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'I18n Source Message', 'modelClass' => 'I18n Source Message',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="i18n-source-message-update"> <div class="i18n-source-message-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -12,11 +12,11 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -12,11 +12,11 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="i18n-source-message-view"> <div class="i18n-source-message-view">
<h1><?php echo Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [ <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
...@@ -25,7 +25,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -25,7 +25,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?> ]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -13,23 +13,23 @@ use trntv\filekit\widget\Upload; ...@@ -13,23 +13,23 @@ use trntv\filekit\widget\Upload;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->errorSummary($model); ?> <?= $form->errorSummary($model); ?>
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<?php echo $form->field($model, 'name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<?php echo $form->field($model, 'slug')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<?php echo $form->field($model, 'description')->textarea(['maxlength' => true]) ?> <?= $form->field($model, 'description')->textarea(['maxlength' => true]) ?>
</div> </div>
</div> </div>
...@@ -52,7 +52,7 @@ use trntv\filekit\widget\Upload; ...@@ -52,7 +52,7 @@ use trntv\filekit\widget\Upload;
</div> </div>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'name') ?> <?= $form->field($model, 'name') ?>
<?php echo $form->field($model, 'slug') ?> <?= $form->field($model, 'slug') ?>
<?php echo $form->field($model, 'description') ?> <?= $form->field($model, 'description') ?>
<?php echo $form->field($model, 'image_url') ?> <?= $form->field($model, 'image_url') ?>
<?php // echo $form->field($model, 'image_path') ?> <?php // echo $form->field($model, 'image_path') ?>
...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm; ...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm;
<?php // echo $form->field($model, 'updated_at') ?> <?php // echo $form->field($model, 'updated_at') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="category-create"> <div class="category-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -17,32 +17,32 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -17,32 +17,32 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Category', 'modelClass' => 'Category',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
//'id', // 'id',
'name', 'name',
// 'slug', // 'slug',
'description', 'description',
// 'image_url:url', // 'image_url:url',
// 'image_path', // 'image_path',
[ [
'class' => EnumColumn::className(), 'class' => EnumColumn::className(),
'attribute' => 'status', 'attribute' => 'status',
'enum' => Category::statuses(), 'enum' => Category::statuses(),
'filter' => Category::statuses() 'filter' => Category::statuses()
], ],
// 'status', 'status',
// 'created_at', 'created_at',
// 'updated_at', // 'updated_at',
['class' => 'yii\grid\ActionColumn'], ['class' => 'yii\grid\ActionColumn'],
], ],
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="category-update"> <div class="category-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="category-view"> <div class="category-view">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [ <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?> ]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -27,23 +27,23 @@ $actionParamComments = $generator->generateActionParamComments(); ...@@ -27,23 +27,23 @@ $actionParamComments = $generator->generateActionParamComments();
echo "<?php\n"; echo "<?php\n";
?> ?>
namespace <?php echo StringHelper::dirname(ltrim($generator->controllerClass, '\\')) ?>; namespace <?= StringHelper::dirname(ltrim($generator->controllerClass, '\\')) ?>;
use Yii; use Yii;
use <?php echo ltrim($generator->modelClass, '\\') ?>; use <?= ltrim($generator->modelClass, '\\') ?>;
<?php if (!empty($generator->searchModelClass)): ?> <?php if (!empty($generator->searchModelClass)): ?>
use <?php echo ltrim($generator->searchModelClass, '\\') . (isset($searchModelAlias) ? " as $searchModelAlias" : "") ?>; use <?= ltrim($generator->searchModelClass, '\\') . (isset($searchModelAlias) ? " as $searchModelAlias" : "") ?>;
<?php else: ?> <?php else: ?>
use yii\data\ActiveDataProvider; use yii\data\ActiveDataProvider;
<?php endif; ?> <?php endif; ?>
use <?php echo ltrim($generator->baseControllerClass, '\\') ?>; use <?= ltrim($generator->baseControllerClass, '\\') ?>;
use yii\web\NotFoundHttpException; use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
/** /**
* <?php echo $controllerClass ?> implements the CRUD actions for <?php echo $modelClass ?> model. * <?= $controllerClass ?> implements the CRUD actions for <?= $modelClass ?> model.
*/ */
class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($generator->baseControllerClass) . "\n" ?> class <?= $controllerClass ?> extends <?= StringHelper::basename($generator->baseControllerClass) . "\n" ?>
{ {
public function behaviors() public function behaviors()
{ {
...@@ -58,13 +58,13 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($ ...@@ -58,13 +58,13 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($
} }
/** /**
* Lists all <?php echo $modelClass ?> models. * Lists all <?= $modelClass ?> models.
* @return mixed * @return mixed
*/ */
public function actionIndex() public function actionIndex()
{ {
<?php if (!empty($generator->searchModelClass)): ?> <?php if (!empty($generator->searchModelClass)): ?>
$searchModel = new <?php echo isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>(); $searchModel = new <?= isset($searchModelAlias) ? $searchModelAlias : $searchModelClass ?>();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [ return $this->render('index', [
...@@ -73,7 +73,7 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($ ...@@ -73,7 +73,7 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($
]); ]);
<?php else: ?> <?php else: ?>
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => <?php echo $modelClass ?>::find(), 'query' => <?= $modelClass ?>::find(),
]); ]);
return $this->render('index', [ return $this->render('index', [
...@@ -83,28 +83,28 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($ ...@@ -83,28 +83,28 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($
} }
/** /**
* Displays a single <?php echo $modelClass ?> model. * Displays a single <?= $modelClass ?> model.
* <?php echo implode("\n * ", $actionParamComments) . "\n" ?> * <?= implode("\n * ", $actionParamComments) . "\n" ?>
* @return mixed * @return mixed
*/ */
public function actionView(<?php echo $actionParams ?>) public function actionView(<?= $actionParams ?>)
{ {
return $this->render('view', [ return $this->render('view', [
'model' => $this->findModel(<?php echo $actionParams ?>), 'model' => $this->findModel(<?= $actionParams ?>),
]); ]);
} }
/** /**
* Creates a new <?php echo $modelClass ?> model. * Creates a new <?= $modelClass ?> model.
* If creation is successful, the browser will be redirected to the 'view' page. * If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed * @return mixed
*/ */
public function actionCreate() public function actionCreate()
{ {
$model = new <?php echo $modelClass ?>(); $model = new <?= $modelClass ?>();
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', <?php echo $urlParams ?>]); return $this->redirect(['view', <?= $urlParams ?>]);
} else { } else {
return $this->render('create', [ return $this->render('create', [
'model' => $model, 'model' => $model,
...@@ -113,17 +113,17 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($ ...@@ -113,17 +113,17 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($
} }
/** /**
* Updates an existing <?php echo $modelClass ?> model. * Updates an existing <?= $modelClass ?> model.
* If update is successful, the browser will be redirected to the 'view' page. * If update is successful, the browser will be redirected to the 'view' page.
* <?php echo implode("\n * ", $actionParamComments) . "\n" ?> * <?= implode("\n * ", $actionParamComments) . "\n" ?>
* @return mixed * @return mixed
*/ */
public function actionUpdate(<?php echo $actionParams ?>) public function actionUpdate(<?= $actionParams ?>)
{ {
$model = $this->findModel(<?php echo $actionParams ?>); $model = $this->findModel(<?= $actionParams ?>);
if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', <?php echo $urlParams ?>]); return $this->redirect(['view', <?= $urlParams ?>]);
} else { } else {
return $this->render('update', [ return $this->render('update', [
'model' => $model, 'model' => $model,
...@@ -132,26 +132,26 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($ ...@@ -132,26 +132,26 @@ class <?php echo $controllerClass ?> extends <?php echo StringHelper::basename($
} }
/** /**
* Deletes an existing <?php echo $modelClass ?> model. * Deletes an existing <?= $modelClass ?> model.
* If deletion is successful, the browser will be redirected to the 'index' page. * If deletion is successful, the browser will be redirected to the 'index' page.
* <?php echo implode("\n * ", $actionParamComments) . "\n" ?> * <?= implode("\n * ", $actionParamComments) . "\n" ?>
* @return mixed * @return mixed
*/ */
public function actionDelete(<?php echo $actionParams ?>) public function actionDelete(<?= $actionParams ?>)
{ {
$this->findModel(<?php echo $actionParams ?>)->delete(); $this->findModel(<?= $actionParams ?>)->delete();
return $this->redirect(['index']); return $this->redirect(['index']);
} }
/** /**
* Finds the <?php echo $modelClass ?> model based on its primary key value. * Finds the <?= $modelClass ?> model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown. * If the model is not found, a 404 HTTP exception will be thrown.
* <?php echo implode("\n * ", $actionParamComments) . "\n" ?> * <?= implode("\n * ", $actionParamComments) . "\n" ?>
* @return <?php echo $modelClass ?> the loaded model * @return <?= $modelClass ?> the loaded model
* @throws NotFoundHttpException if the model cannot be found * @throws NotFoundHttpException if the model cannot be found
*/ */
protected function findModel(<?php echo $actionParams ?>) protected function findModel(<?= $actionParams ?>)
{ {
<?php <?php
if (count($pks) === 1) { if (count($pks) === 1) {
...@@ -164,7 +164,7 @@ if (count($pks) === 1) { ...@@ -164,7 +164,7 @@ if (count($pks) === 1) {
$condition = '[' . implode(', ', $condition) . ']'; $condition = '[' . implode(', ', $condition) . ']';
} }
?> ?>
if (($model = <?php echo $modelClass ?>::findOne(<?php echo $condition ?>)) !== null) { if (($model = <?= $modelClass ?>::findOne(<?= $condition ?>)) !== null) {
return $model; return $model;
} else { } else {
throw new NotFoundHttpException('The requested page does not exist.'); throw new NotFoundHttpException('The requested page does not exist.');
......
...@@ -22,17 +22,17 @@ $searchConditions = $generator->generateSearchConditions(); ...@@ -22,17 +22,17 @@ $searchConditions = $generator->generateSearchConditions();
echo "<?php\n"; echo "<?php\n";
?> ?>
namespace <?php echo StringHelper::dirname(ltrim($generator->searchModelClass, '\\')) ?>; namespace <?= StringHelper::dirname(ltrim($generator->searchModelClass, '\\')) ?>;
use Yii; use Yii;
use yii\base\Model; use yii\base\Model;
use yii\data\ActiveDataProvider; use yii\data\ActiveDataProvider;
use <?php echo ltrim($generator->modelClass, '\\') . (isset($modelAlias) ? " as $modelAlias" : "") ?>; use <?= ltrim($generator->modelClass, '\\') . (isset($modelAlias) ? " as $modelAlias" : "") ?>;
/** /**
* <?php echo $searchModelClass ?> represents the model behind the search form about `<?php echo $generator->modelClass ?>`. * <?= $searchModelClass ?> represents the model behind the search form about `<?= $generator->modelClass ?>`.
*/ */
class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $modelAlias : $modelClass ?> class <?= $searchModelClass ?> extends <?= isset($modelAlias) ? $modelAlias : $modelClass ?>
{ {
/** /**
...@@ -41,7 +41,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m ...@@ -41,7 +41,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m
public function rules() public function rules()
{ {
return [ return [
<?php echo implode(",\n ", $rules) ?>, <?= implode(",\n ", $rules) ?>,
]; ];
} }
...@@ -63,7 +63,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m ...@@ -63,7 +63,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m
*/ */
public function search($params) public function search($params)
{ {
$query = <?php echo isset($modelAlias) ? $modelAlias : $modelClass ?>::find(); $query = <?= isset($modelAlias) ? $modelAlias : $modelClass ?>::find();
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
...@@ -73,7 +73,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m ...@@ -73,7 +73,7 @@ class <?php echo $searchModelClass ?> extends <?php echo isset($modelAlias) ? $m
return $dataProvider; return $dataProvider;
} }
<?php echo implode("\n ", $searchConditions) ?> <?= implode("\n ", $searchConditions) ?>
return $dataProvider; return $dataProvider;
} }
......
...@@ -20,25 +20,25 @@ use yii\helpers\Html; ...@@ -20,25 +20,25 @@ use yii\helpers\Html;
use yii\bootstrap\ActiveForm; use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model <?php echo ltrim($generator->modelClass, '\\') ?> */ /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
/* @var $form yii\bootstrap\ActiveForm */ /* @var $form yii\bootstrap\ActiveForm */
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-form"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-form">
<?php echo "<?php " ?>$form = ActiveForm::begin(); ?> <?= "<?php " ?>$form = ActiveForm::begin(); ?>
<?php echo "<?php echo " ?>$form->errorSummary($model); ?> <?= "<?= " ?>$form->errorSummary($model); ?>
<?php foreach ($generator->getColumnNames() as $attribute) { <?php foreach ($generator->getColumnNames() as $attribute) {
if (in_array($attribute, $safeAttributes)) { if (in_array($attribute, $safeAttributes)) {
echo " <?php echo " . $generator->generateActiveField($attribute) . " ?>\n\n"; echo " <?= " . $generator->generateActiveField($attribute) . " ?>\n\n";
} }
} ?> } ?>
<div class="form-group"> <div class="form-group">
<?php echo "<?php echo " ?>Html::submitButton($model->isNewRecord ? <?php echo $generator->generateString('Create') ?> : <?php echo $generator->generateString('Update') ?>, ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= "<?= " ?>Html::submitButton($model->isNewRecord ? <?= $generator->generateString('Create') ?> : <?= $generator->generateString('Update') ?>, ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php echo "<?php " ?>ActiveForm::end(); ?> <?= "<?php " ?>ActiveForm::end(); ?>
</div> </div>
...@@ -13,13 +13,13 @@ use yii\helpers\Html; ...@@ -13,13 +13,13 @@ use yii\helpers\Html;
use yii\bootstrap\ActiveForm; use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model <?php echo ltrim($generator->searchModelClass, '\\') ?> */ /* @var $model <?= ltrim($generator->searchModelClass, '\\') ?> */
/* @var $form yii\bootstrap\ActiveForm */ /* @var $form yii\bootstrap\ActiveForm */
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-search"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-search">
<?php echo "<?php " ?>$form = ActiveForm::begin([ <?= "<?php " ?>$form = ActiveForm::begin([
'action' => ['index'], 'action' => ['index'],
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
...@@ -28,17 +28,17 @@ use yii\bootstrap\ActiveForm; ...@@ -28,17 +28,17 @@ use yii\bootstrap\ActiveForm;
$count = 0; $count = 0;
foreach ($generator->getColumnNames() as $attribute) { foreach ($generator->getColumnNames() as $attribute) {
if (++$count < 6) { if (++$count < 6) {
echo " <?php echo " . $generator->generateActiveSearchField($attribute) . " ?>\n\n"; echo " <?= " . $generator->generateActiveSearchField($attribute) . " ?>\n\n";
} else { } else {
echo " <?php // echo " . $generator->generateActiveSearchField($attribute) . " ?>\n\n"; echo " <?php // echo " . $generator->generateActiveSearchField($attribute) . " ?>\n\n";
} }
} }
?> ?>
<div class="form-group"> <div class="form-group">
<?php echo "<?php echo " ?>Html::submitButton(<?php echo $generator->generateString('Search') ?>, ['class' => 'btn btn-primary']) ?> <?= "<?= " ?>Html::submitButton(<?= $generator->generateString('Search') ?>, ['class' => 'btn btn-primary']) ?>
<?php echo "<?php echo " ?>Html::resetButton(<?php echo $generator->generateString('Reset') ?>, ['class' => 'btn btn-default']) ?> <?= "<?= " ?>Html::resetButton(<?= $generator->generateString('Reset') ?>, ['class' => 'btn btn-default']) ?>
</div> </div>
<?php echo "<?php " ?>ActiveForm::end(); ?> <?= "<?php " ?>ActiveForm::end(); ?>
</div> </div>
...@@ -13,15 +13,15 @@ use yii\helpers\Html; ...@@ -13,15 +13,15 @@ use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model <?php echo ltrim($generator->modelClass, '\\') ?> */ /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
$this->title = <?php echo $generator->generateString('Create {modelClass}', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?>; $this->title = <?= $generator->generateString('Create {modelClass}', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?>;
$this->params['breadcrumbs'][] = ['label' => <?php echo $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-create"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-create">
<?php echo "<?php echo " ?>$this->render('_form', [ <?= "<?= " ?>$this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -13,29 +13,29 @@ echo "<?php\n"; ...@@ -13,29 +13,29 @@ echo "<?php\n";
?> ?>
use yii\helpers\Html; use yii\helpers\Html;
use <?php echo $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\widgets\\ListView" ?>; use <?= $generator->indexWidgetType === 'grid' ? "yii\\grid\\GridView" : "yii\\widgets\\ListView" ?>;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
<?php echo !empty($generator->searchModelClass) ? "/* @var \$searchModel " . ltrim($generator->searchModelClass, '\\') . " */\n" : '' ?> <?= !empty($generator->searchModelClass) ? "/* @var \$searchModel " . ltrim($generator->searchModelClass, '\\') . " */\n" : '' ?>
/* @var $dataProvider yii\data\ActiveDataProvider */ /* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = <?php echo $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>; $this->title = <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>;
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-index"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-index">
<?php if(!empty($generator->searchModelClass)): ?> <?php if(!empty($generator->searchModelClass)): ?>
<?php echo " <?php " . ($generator->indexWidgetType === 'grid' ? "// " : "") ?>echo $this->render('_search', ['model' => $searchModel]); ?> <?= " <?php " . ($generator->indexWidgetType === 'grid' ? "// " : "") ?>echo $this->render('_search', ['model' => $searchModel]); ?>
<?php endif; ?> <?php endif; ?>
<p> <p>
<?php echo "<?php echo " ?>Html::a(<?php echo $generator->generateString('Create {modelClass}', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?>, ['create'], ['class' => 'btn btn-success']) ?> <?= "<?= " ?>Html::a(<?= $generator->generateString('Create {modelClass}', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?>, ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php if ($generator->indexWidgetType === 'grid'): ?> <?php if ($generator->indexWidgetType === 'grid'): ?>
<?php echo "<?php echo " ?>GridView::widget([ <?= "<?= " ?>GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
<?php echo !empty($generator->searchModelClass) ? "'filterModel' => \$searchModel,\n 'columns' => [\n" : "'columns' => [\n"; ?> <?= !empty($generator->searchModelClass) ? "'filterModel' => \$searchModel,\n 'columns' => [\n" : "'columns' => [\n"; ?>
['class' => 'yii\grid\SerialColumn'], ['class' => 'yii\grid\SerialColumn'],
<?php <?php
...@@ -64,11 +64,11 @@ if (($tableSchema = $generator->getTableSchema()) === false) { ...@@ -64,11 +64,11 @@ if (($tableSchema = $generator->getTableSchema()) === false) {
], ],
]); ?> ]); ?>
<?php else: ?> <?php else: ?>
<?php echo "<?php echo " ?>ListView::widget([ <?= "<?= " ?>ListView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'itemOptions' => ['class' => 'item'], 'itemOptions' => ['class' => 'item'],
'itemView' => function ($model, $key, $index, $widget) { 'itemView' => function ($model, $key, $index, $widget) {
return Html::a(Html::encode($model-><?php echo $nameAttribute ?>), ['view', <?php echo $urlParams ?>]); return Html::a(Html::encode($model-><?= $nameAttribute ?>), ['view', <?= $urlParams ?>]);
}, },
]) ?> ]) ?>
<?php endif; ?> <?php endif; ?>
......
...@@ -14,16 +14,16 @@ echo "<?php\n"; ...@@ -14,16 +14,16 @@ echo "<?php\n";
use yii\helpers\Html; use yii\helpers\Html;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model <?php echo ltrim($generator->modelClass, '\\') ?> */ /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
$this->title = <?php echo $generator->generateString('Update {modelClass}: ', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?> . ' ' . $model-><?php echo $generator->getNameAttribute() ?>; $this->title = <?= $generator->generateString('Update {modelClass}: ', ['modelClass' => Inflector::camel2words(StringHelper::basename($generator->modelClass))]) ?> . ' ' . $model-><?= $generator->getNameAttribute() ?>;
$this->params['breadcrumbs'][] = ['label' => <?php echo $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model-><?php echo $generator->getNameAttribute() ?>, 'url' => ['view', <?php echo $urlParams ?>]]; $this->params['breadcrumbs'][] = ['label' => $model-><?= $generator->getNameAttribute() ?>, 'url' => ['view', <?= $urlParams ?>]];
$this->params['breadcrumbs'][] = <?php echo $generator->generateString('Update') ?>; $this->params['breadcrumbs'][] = <?= $generator->generateString('Update') ?>;
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-update"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-update">
<?php echo "<?php echo " ?>$this->render('_form', [ <?= "<?= " ?>$this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -15,26 +15,26 @@ use yii\helpers\Html; ...@@ -15,26 +15,26 @@ use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model <?php echo ltrim($generator->modelClass, '\\') ?> */ /* @var $model <?= ltrim($generator->modelClass, '\\') ?> */
$this->title = $model-><?php echo $generator->getNameAttribute() ?>; $this->title = $model-><?= $generator->getNameAttribute() ?>;
$this->params['breadcrumbs'][] = ['label' => <?php echo $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => <?= $generator->generateString(Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass)))) ?>, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="<?php echo Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-view"> <div class="<?= Inflector::camel2id(StringHelper::basename($generator->modelClass)) ?>-view">
<p> <p>
<?php echo "<?php echo " ?>Html::a(<?php echo $generator->generateString('Update') ?>, ['update', <?php echo $urlParams ?>], ['class' => 'btn btn-primary']) ?> <?= "<?= " ?>Html::a(<?= $generator->generateString('Update') ?>, ['update', <?= $urlParams ?>], ['class' => 'btn btn-primary']) ?>
<?php echo "<?php echo " ?>Html::a(<?php echo $generator->generateString('Delete') ?>, ['delete', <?php echo $urlParams ?>], [ <?= "<?= " ?>Html::a(<?= $generator->generateString('Delete') ?>, ['delete', <?= $urlParams ?>], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => <?php echo $generator->generateString('Are you sure you want to delete this item?') ?>, 'confirm' => <?= $generator->generateString('Are you sure you want to delete this item?') ?>,
'method' => 'post', 'method' => 'post',
], ],
]) ?> ]) ?>
</p> </p>
<?php echo "<?php echo " ?>DetailView::widget([ <?= "<?= " ?>DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
<?php <?php
......
...@@ -13,18 +13,18 @@ use yii\bootstrap\ActiveForm; ...@@ -13,18 +13,18 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => 512]) ?> <?= $form->field($model, 'title')->textInput(['maxlength' => 512]) ?>
<?php echo $form->field($model, 'slug') <?= $form->field($model, 'slug')
->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically')) ->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically'))
->textInput(['maxlength' => 1024]) ?> ->textInput(['maxlength' => 1024]) ?>
<?php echo $form->field($model, 'parent_id')->dropDownList($categories, ['prompt'=>'']) ?> <?= $form->field($model, 'parent_id')->dropDownList($categories, ['prompt'=>'']) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,17 +15,17 @@ use yii\bootstrap\ActiveForm; ...@@ -15,17 +15,17 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'slug') ?> <?= $form->field($model, 'slug') ?>
<?php echo $form->field($model, 'title') ?> <?= $form->field($model, 'title') ?>
<?php echo $form->field($model, 'status') ?> <?= $form->field($model, 'status') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="article-category-create"> <div class="article-category-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'categories' => $categories 'categories' => $categories
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Article Category', 'modelClass' => 'Article Category',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="article-category-update"> <div class="article-category-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'categories' => $categories, 'categories' => $categories,
]) ?> ]) ?>
......
...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="article-category-view"> <div class="article-category-view">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [ <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?> ]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -15,19 +15,19 @@ use yii\bootstrap\ActiveForm; ...@@ -15,19 +15,19 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'slug') <?= $form->field($model, 'slug')
->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically')) ->hint(Yii::t('backend', 'If you\'ll leave this field empty, slug will be generated automatically'))
->textInput(['maxlength' => true]) ?> ->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'category_id')->dropDownList(\yii\helpers\ArrayHelper::map( <?= $form->field($model, 'category_id')->dropDownList(\yii\helpers\ArrayHelper::map(
$categories, $categories,
'id', 'id',
'title' 'title'
), ['prompt'=>'']) ?> ), ['prompt'=>'']) ?>
<?php echo $form->field($model, 'body')->widget( <?= $form->field($model, 'body')->widget(
\yii\imperavi\Widget::className(), \yii\imperavi\Widget::className(),
[ [
'plugins' => ['fullscreen', 'fontcolor', 'video'], 'plugins' => ['fullscreen', 'fontcolor', 'video'],
...@@ -42,7 +42,7 @@ use yii\bootstrap\ActiveForm; ...@@ -42,7 +42,7 @@ use yii\bootstrap\ActiveForm;
] ]
) ?> ) ?>
<?php echo $form->field($model, 'thumbnail')->widget( <?= $form->field($model, 'thumbnail')->widget(
Upload::className(), Upload::className(),
[ [
'url' => ['/file-storage/upload'], 'url' => ['/file-storage/upload'],
...@@ -50,7 +50,7 @@ use yii\bootstrap\ActiveForm; ...@@ -50,7 +50,7 @@ use yii\bootstrap\ActiveForm;
]); ]);
?> ?>
<?php echo $form->field($model, 'attachments')->widget( <?= $form->field($model, 'attachments')->widget(
Upload::className(), Upload::className(),
[ [
'url' => ['/file-storage/upload'], 'url' => ['/file-storage/upload'],
...@@ -60,11 +60,11 @@ use yii\bootstrap\ActiveForm; ...@@ -60,11 +60,11 @@ use yii\bootstrap\ActiveForm;
]); ]);
?> ?>
<?php echo $form->field($model, 'view')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'view')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<?php echo $form->field($model, 'published_at')->widget( <?= $form->field($model, 'published_at')->widget(
DateTimeWidget::className(), DateTimeWidget::className(),
[ [
'phpDatetimeFormat' => 'yyyy-MM-dd\'T\'HH:mm:ssZZZZZ' 'phpDatetimeFormat' => 'yyyy-MM-dd\'T\'HH:mm:ssZZZZZ'
...@@ -72,7 +72,7 @@ use yii\bootstrap\ActiveForm; ...@@ -72,7 +72,7 @@ use yii\bootstrap\ActiveForm;
) ?> ) ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton( <?= Html::submitButton(
$model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), $model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'),
['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
......
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'slug') ?> <?= $form->field($model, 'slug') ?>
<?php echo $form->field($model, 'title') ?> <?= $form->field($model, 'title') ?>
<?php echo $form->field($model, 'body') ?> <?= $form->field($model, 'body') ?>
<?php echo $form->field($model, 'user_id') ?> <?= $form->field($model, 'user_id') ?>
<?php // echo $form->field($model, 'status') ?> <?php // echo $form->field($model, 'status') ?>
...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm; ...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm;
<?php // echo $form->field($model, 'updated_at') ?> <?php // echo $form->field($model, 'updated_at') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="article-create"> <div class="article-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'categories' => $categories 'categories' => $categories
]) ?> ]) ?>
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="article-update"> <div class="article-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'categories' => $categories, 'categories' => $categories,
]) ?> ]) ?>
......
...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -11,7 +11,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="article-index"> <div class="article-index">
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'columns' => [ 'columns' => [
'name', 'name',
...@@ -33,32 +33,32 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -33,32 +33,32 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="row"> <div class="row">
<div class="col-xs-6"> <div class="col-xs-6">
<h4><?php echo Yii::t('backend', 'Delete a value with the specified key from cache') ?></h4> <h4><?= Yii::t('backend', 'Delete a value with the specified key from cache') ?></h4>
<?php \yii\bootstrap\ActiveForm::begin([ <?php \yii\bootstrap\ActiveForm::begin([
'action'=>\yii\helpers\Url::to('flush-cache-key'), 'action'=>\yii\helpers\Url::to('flush-cache-key'),
'method'=>'get', 'method'=>'get',
'layout'=>'inline', 'layout'=>'inline',
]) ?> ]) ?>
<?php echo Html::dropDownList( <?= Html::dropDownList(
'id', null, \yii\helpers\ArrayHelper::map($dataProvider->allModels, 'name', 'name'), 'id', null, \yii\helpers\ArrayHelper::map($dataProvider->allModels, 'name', 'name'),
['class'=>'form-control', 'prompt'=> Yii::t('backend', 'Select cache')]) ['class'=>'form-control', 'prompt'=> Yii::t('backend', 'Select cache')])
?> ?>
<?php echo Html::input('string', 'key', null, ['class'=>'form-control', 'placeholder' => Yii::t('backend', 'Key')]) ?> <?= Html::input('string', 'key', null, ['class'=>'form-control', 'placeholder' => Yii::t('backend', 'Key')]) ?>
<?php echo Html::submitButton(Yii::t('backend', 'Flush'), ['class'=>'btn btn-danger']) ?> <?= Html::submitButton(Yii::t('backend', 'Flush'), ['class'=>'btn btn-danger']) ?>
<?php \yii\bootstrap\ActiveForm::end() ?> <?php \yii\bootstrap\ActiveForm::end() ?>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<h4><?php echo Yii::t('backend', 'Invalidate tag') ?></h4> <h4><?= Yii::t('backend', 'Invalidate tag') ?></h4>
<?php \yii\bootstrap\ActiveForm::begin([ <?php \yii\bootstrap\ActiveForm::begin([
'action'=>\yii\helpers\Url::to('flush-cache-tag'), 'action'=>\yii\helpers\Url::to('flush-cache-tag'),
'method'=>'get', 'method'=>'get',
'layout'=>'inline' 'layout'=>'inline'
]) ?> ]) ?>
<?php echo Html::dropDownList( <?= Html::dropDownList(
'id', null, \yii\helpers\ArrayHelper::map($dataProvider->allModels, 'name', 'name'), 'id', null, \yii\helpers\ArrayHelper::map($dataProvider->allModels, 'name', 'name'),
['class'=>'form-control', 'prompt'=> Yii::t('backend', 'Select cache')]) ?> ['class'=>'form-control', 'prompt'=> Yii::t('backend', 'Select cache')]) ?>
<?php echo Html::input('string', 'tag', null, ['class'=>'form-control', 'placeholder' => Yii::t('backend', 'Tag')]) ?> <?= Html::input('string', 'tag', null, ['class'=>'form-control', 'placeholder' => Yii::t('backend', 'Tag')]) ?>
<?php echo Html::submitButton(Yii::t('backend', 'Flush'), ['class'=>'btn btn-danger']) ?> <?= Html::submitButton(Yii::t('backend', 'Flush'), ['class'=>'btn btn-danger']) ?>
<?php \yii\bootstrap\ActiveForm::end() ?> <?php \yii\bootstrap\ActiveForm::end() ?>
</div> </div>
</div> </div>
......
...@@ -5,7 +5,7 @@ $this->title = Yii::t('backend', 'File Manager') ...@@ -5,7 +5,7 @@ $this->title = Yii::t('backend', 'File Manager')
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<?php echo \mihaildev\elfinder\ElFinder::widget([ <?= \mihaildev\elfinder\ElFinder::widget([
'controller' => 'file-manager-elfinder', 'controller' => 'file-manager-elfinder',
'frameOptions' => ['style'=>'min-height: 500px; width: 100%; border: 0'], 'frameOptions' => ['style'=>'min-height: 500px; width: 100%; border: 0'],
]); ]);
......
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'component') ?> <?= $form->field($model, 'component') ?>
<?php echo $form->field($model, 'base_url') ?> <?= $form->field($model, 'base_url') ?>
<?php echo $form->field($model, 'path') ?> <?= $form->field($model, 'path') ?>
<?php echo $form->field($model, 'type') ?> <?= $form->field($model, 'type') ?>
<?php // echo $form->field($model, 'size') ?> <?php // echo $form->field($model, 'size') ?>
...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm; ...@@ -34,8 +34,8 @@ use yii\bootstrap\ActiveForm;
<?php // echo $form->field($model, 'created_at') ?> <?php // echo $form->field($model, 'created_at') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -20,10 +20,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -20,10 +20,10 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="col-xs-12"> <div class="col-xs-12">
<dl> <dl>
<dt> <dt>
<?php echo Yii::t('backend', 'Used size') ?>: <?= Yii::t('backend', 'Used size') ?>:
</dt> </dt>
<dd> <dd>
<?php echo Yii::$app->formatter->asSize($totalSize); ?> <?= Yii::$app->formatter->asSize($totalSize); ?>
</dd> </dd>
</dl> </dl>
</div> </div>
...@@ -33,10 +33,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -33,10 +33,10 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="col-xs-12"> <div class="col-xs-12">
<dl> <dl>
<dt> <dt>
<?php echo Yii::t('backend', 'Count') ?>: <?= Yii::t('backend', 'Count') ?>:
</dt> </dt>
<dd> <dd>
<?php echo $dataProvider->totalCount ?> <?= $dataProvider->totalCount ?>
</dd> </dd>
</dl> </dl>
</div> </div>
...@@ -44,7 +44,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -44,7 +44,7 @@ $this->params['breadcrumbs'][] = $this->title;
</div> </div>
</div> </div>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="file-storage-item-view"> <div class="file-storage-item-view">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [ <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?> ]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -12,14 +12,14 @@ use yii\bootstrap\ActiveForm; ...@@ -12,14 +12,14 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'key')->textInput() ?> <?= $form->field($model, 'key')->textInput() ?>
<?php echo $form->field($model, 'value')->textInput() ?> <?= $form->field($model, 'value')->textInput() ?>
<?php echo $form->field($model, 'comment')->textarea() ?> <?= $form->field($model, 'comment')->textarea() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="key-storage-item-create"> <div class="key-storage-item-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Key Storage Item', 'modelClass' => 'Key Storage Item',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="key-storage-item-update"> <div class="key-storage-item-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -15,17 +15,17 @@ $this->params['body-class'] = array_key_exists('body-class', $this->params) ? ...@@ -15,17 +15,17 @@ $this->params['body-class'] = array_key_exists('body-class', $this->params) ?
<?php $this->beginPage() ?> <?php $this->beginPage() ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo Yii::$app->language ?>"> <html lang="<?= Yii::$app->language ?>">
<head> <head>
<meta charset="<?php echo Yii::$app->charset ?>"> <meta charset="<?= Yii::$app->charset ?>">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<?php echo Html::csrfMetaTags() ?> <?= Html::csrfMetaTags() ?>
<title><?php echo Html::encode($this->title) ?></title> <title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?> <?php $this->head() ?>
</head> </head>
<?php echo Html::beginTag('body', [ <?= Html::beginTag('body', [
'class' => implode(' ', [ 'class' => implode(' ', [
ArrayHelper::getValue($this->params, 'body-class'), ArrayHelper::getValue($this->params, 'body-class'),
Yii::$app->keyStorage->get('backend.theme-skin', 'skin-blue'), Yii::$app->keyStorage->get('backend.theme-skin', 'skin-blue'),
...@@ -35,8 +35,8 @@ $this->params['body-class'] = array_key_exists('body-class', $this->params) ? ...@@ -35,8 +35,8 @@ $this->params['body-class'] = array_key_exists('body-class', $this->params) ?
]) ])
])?> ])?>
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?php echo $content ?> <?= $content ?>
<?php $this->endBody() ?> <?php $this->endBody() ?>
<?php echo Html::endTag('body') ?> <?= Html::endTag('body') ?>
</html> </html>
<?php $this->endPage() ?> <?php $this->endPage() ?>
\ No newline at end of file
...@@ -16,15 +16,15 @@ $bundle = BackendAsset::register($this); ...@@ -16,15 +16,15 @@ $bundle = BackendAsset::register($this);
<div class="wrapper"> <div class="wrapper">
<!-- header logo: style can be found in header.less --> <!-- header logo: style can be found in header.less -->
<header class="main-header"> <header class="main-header">
<a href="<?php echo Yii::getAlias('@frontendUrl') ?>" class="logo"> <a href="<?= Yii::getAlias('@frontendUrl') ?>" class="logo">
<!-- Add the class icon to your logo image or logo icon to add the margining --> <!-- Add the class icon to your logo image or logo icon to add the margining -->
<?php echo Yii::$app->name ?> <?= Yii::$app->name ?>
</a> </a>
<!-- Header Navbar: style can be found in header.less --> <!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation"> <nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button--> <!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only"><?php echo Yii::t('backend', 'Toggle navigation') ?></span> <span class="sr-only"><?= Yii::t('backend', 'Toggle navigation') ?></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
...@@ -32,10 +32,10 @@ $bundle = BackendAsset::register($this); ...@@ -32,10 +32,10 @@ $bundle = BackendAsset::register($this);
<div class="navbar-custom-menu"> <div class="navbar-custom-menu">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li id="timeline-notifications" class="notifications-menu"> <li id="timeline-notifications" class="notifications-menu">
<a href="<?php echo Url::to(['/timeline-event/index']) ?>"> <a href="<?= Url::to(['/timeline-event/index']) ?>">
<i class="fa fa-bell"></i> <i class="fa fa-bell"></i>
<span class="label label-success"> <span class="label label-success">
<?php echo TimelineEvent::find()->today()->count() ?> <?= TimelineEvent::find()->today()->count() ?>
</span> </span>
</a> </a>
</li> </li>
...@@ -44,61 +44,61 @@ $bundle = BackendAsset::register($this); ...@@ -44,61 +44,61 @@ $bundle = BackendAsset::register($this);
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-warning"></i> <i class="fa fa-warning"></i>
<span class="label label-danger"> <span class="label label-danger">
<?php echo \backend\models\SystemLog::find()->count() ?> <?= \backend\models\SystemLog::find()->count() ?>
</span> </span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="header"><?php echo Yii::t('backend', 'You have {num} log items', ['num'=>\backend\models\SystemLog::find()->count()]) ?></li> <li class="header"><?= Yii::t('backend', 'You have {num} log items', ['num'=>\backend\models\SystemLog::find()->count()]) ?></li>
<li> <li>
<!-- inner menu: contains the actual data --> <!-- inner menu: contains the actual data -->
<ul class="menu"> <ul class="menu">
<?php foreach(\backend\models\SystemLog::find()->orderBy(['log_time'=>SORT_DESC])->limit(5)->all() as $logEntry): ?> <?php foreach(\backend\models\SystemLog::find()->orderBy(['log_time'=>SORT_DESC])->limit(5)->all() as $logEntry): ?>
<li> <li>
<a href="<?php echo Yii::$app->urlManager->createUrl(['/log/view', 'id'=>$logEntry->id]) ?>"> <a href="<?= Yii::$app->urlManager->createUrl(['/log/view', 'id'=>$logEntry->id]) ?>">
<i class="fa fa-warning <?php echo $logEntry->level == \yii\log\Logger::LEVEL_ERROR ? 'text-red' : 'text-yellow' ?>"></i> <i class="fa fa-warning <?= $logEntry->level == \yii\log\Logger::LEVEL_ERROR ? 'text-red' : 'text-yellow' ?>"></i>
<?php echo $logEntry->category ?> <?= $logEntry->category ?>
</a> </a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</li> </li>
<li class="footer"> <li class="footer">
<?php echo Html::a(Yii::t('backend', 'View all'), ['/log/index']) ?> <?= Html::a(Yii::t('backend', 'View all'), ['/log/index']) ?>
</li> </li>
</ul> </ul>
</li> </li>
<!-- User Account: style can be found in dropdown.less --> <!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu"> <li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?php echo Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="user-image"> <img src="<?= Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="user-image">
<span><?php echo Yii::$app->user->identity->username ?> <i class="caret"></i></span> <span><?= Yii::$app->user->identity->username ?> <i class="caret"></i></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<!-- User image --> <!-- User image -->
<li class="user-header light-blue"> <li class="user-header light-blue">
<img src="<?php echo Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="img-circle" alt="User Image" /> <img src="<?= Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="img-circle" alt="User Image" />
<p> <p>
<?php echo Yii::$app->user->identity->username ?> <?= Yii::$app->user->identity->username ?>
<small> <small>
<?php echo Yii::t('backend', 'Member since {0, date, short}', Yii::$app->user->identity->created_at) ?> <?= Yii::t('backend', 'Member since {0, date, short}', Yii::$app->user->identity->created_at) ?>
</small> </small>
</li> </li>
<!-- Menu Footer--> <!-- Menu Footer-->
<li class="user-footer"> <li class="user-footer">
<div class="pull-left"> <div class="pull-left">
<?php echo Html::a(Yii::t('backend', 'Profile'), ['/sign-in/profile'], ['class'=>'btn btn-default btn-flat']) ?> <?= Html::a(Yii::t('backend', 'Profile'), ['/sign-in/profile'], ['class'=>'btn btn-default btn-flat']) ?>
</div> </div>
<div class="pull-left"> <div class="pull-left">
<?php echo Html::a(Yii::t('backend', 'Account'), ['/sign-in/account'], ['class'=>'btn btn-default btn-flat']) ?> <?= Html::a(Yii::t('backend', 'Account'), ['/sign-in/account'], ['class'=>'btn btn-default btn-flat']) ?>
</div> </div>
<div class="pull-right"> <div class="pull-right">
<?php echo Html::a(Yii::t('backend', 'Logout'), ['/sign-in/logout'], ['class'=>'btn btn-default btn-flat', 'data-method' => 'post']) ?> <?= Html::a(Yii::t('backend', 'Logout'), ['/sign-in/logout'], ['class'=>'btn btn-default btn-flat', 'data-method' => 'post']) ?>
</div> </div>
</li> </li>
</ul> </ul>
</li> </li>
<li> <li>
<?php echo Html::a('<i class="fa fa-cogs"></i>', ['/site/settings'])?> <?= Html::a('<i class="fa fa-cogs"></i>', ['/site/settings'])?>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -111,18 +111,18 @@ $bundle = BackendAsset::register($this); ...@@ -111,18 +111,18 @@ $bundle = BackendAsset::register($this);
<!-- Sidebar user panel --> <!-- Sidebar user panel -->
<div class="user-panel"> <div class="user-panel">
<div class="pull-left image"> <div class="pull-left image">
<img src="<?php echo Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="img-circle" /> <img src="<?= Yii::$app->user->identity->userProfile->getAvatar($this->assetManager->getAssetUrl($bundle, 'img/anonymous.jpg')) ?>" class="img-circle" />
</div> </div>
<div class="pull-left info"> <div class="pull-left info">
<p><?php echo Yii::t('backend', 'Hello, {username}', ['username'=>Yii::$app->user->identity->getPublicIdentity()]) ?></p> <p><?= Yii::t('backend', 'Hello, {username}', ['username'=>Yii::$app->user->identity->getPublicIdentity()]) ?></p>
<a href="<?php echo Url::to(['/sign-in/profile']) ?>"> <a href="<?= Url::to(['/sign-in/profile']) ?>">
<i class="fa fa-circle text-success"></i> <i class="fa fa-circle text-success"></i>
<?php echo Yii::$app->formatter->asDatetime(time()) ?> <?= Yii::$app->formatter->asDatetime(time()) ?>
</a> </a>
</div> </div>
</div> </div>
<!-- sidebar menu: : style can be found in sidebar.less --> <!-- sidebar menu: : style can be found in sidebar.less -->
<?php echo Menu::widget([ <?= Menu::widget([
'options'=>['class'=>'sidebar-menu'], 'options'=>['class'=>'sidebar-menu'],
'linkTemplate' => '<a href="{url}">{icon}<span>{label}</span>{right-icon}{badge}</a>', 'linkTemplate' => '<a href="{url}">{icon}<span>{label}</span>{right-icon}{badge}</a>',
'submenuTemplate'=>"\n<ul class=\"treeview-menu\">\n{items}\n</ul>\n", 'submenuTemplate'=>"\n<ul class=\"treeview-menu\">\n{items}\n</ul>\n",
...@@ -214,13 +214,13 @@ $bundle = BackendAsset::register($this); ...@@ -214,13 +214,13 @@ $bundle = BackendAsset::register($this);
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
<h1> <h1>
<?php echo $this->title ?> <?= $this->title ?>
<?php if (isset($this->params['subtitle'])): ?> <?php if (isset($this->params['subtitle'])): ?>
<small><?php echo $this->params['subtitle'] ?></small> <small><?= $this->params['subtitle'] ?></small>
<?php endif; ?> <?php endif; ?>
</h1> </h1>
<?php echo Breadcrumbs::widget([ <?= Breadcrumbs::widget([
'tag'=>'ol', 'tag'=>'ol',
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?> ]) ?>
...@@ -229,12 +229,12 @@ $bundle = BackendAsset::register($this); ...@@ -229,12 +229,12 @@ $bundle = BackendAsset::register($this);
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
<?php if (Yii::$app->session->hasFlash('alert')):?> <?php if (Yii::$app->session->hasFlash('alert')):?>
<?php echo \yii\bootstrap\Alert::widget([ <?= \yii\bootstrap\Alert::widget([
'body'=>ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'body'), 'body'=>ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'body'),
'options'=>ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'options'), 'options'=>ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'options'),
])?> ])?>
<?php endif; ?> <?php endif; ?>
<?php echo $content ?> <?= $content ?>
</section><!-- /.content --> </section><!-- /.content -->
</aside><!-- /.right-side --> </aside><!-- /.right-side -->
</div><!-- ./wrapper --> </div><!-- ./wrapper -->
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<?php $this->beginContent('@backend/views/layouts/common.php'); ?> <?php $this->beginContent('@backend/views/layouts/common.php'); ?>
<div class="box"> <div class="box">
<div class="box-body"> <div class="box-body">
<?php echo $content ?> <?= $content ?>
</div> </div>
</div> </div>
<?php $this->endContent(); ?> <?php $this->endContent(); ?>
\ No newline at end of file
...@@ -15,21 +15,21 @@ use yii\bootstrap\ActiveForm; ...@@ -15,21 +15,21 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'level') ?> <?= $form->field($model, 'level') ?>
<?php echo $form->field($model, 'category') ?> <?= $form->field($model, 'category') ?>
<?php echo $form->field($model, 'log_time') ?> <?= $form->field($model, 'log_time') ?>
<?php echo $form->field($model, 'prefix') ?> <?= $form->field($model, 'prefix') ?>
<?php echo $form->field($model, 'message') ?> <?= $form->field($model, 'message') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -13,12 +13,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,12 +13,12 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="system-log-index"> <div class="system-log-index">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Clear'), false, ['class' => 'btn btn-danger', 'data-method'=>'delete']) ?> <?= Html::a(Yii::t('backend', 'Clear'), false, ['class' => 'btn btn-danger', 'data-method'=>'delete']) ?>
</p> </p>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -13,10 +13,10 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,10 +13,10 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="system-log-view"> <div class="system-log-view">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id'=>$model->id], ['class' => 'btn btn-danger', 'data'=>['method'=>'post']]) ?> <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id'=>$model->id], ['class' => 'btn btn-danger', 'data'=>['method'=>'post']]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -12,11 +12,11 @@ use yii\bootstrap\ActiveForm; ...@@ -12,11 +12,11 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'slug')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'body')->widget( <?= $form->field($model, 'body')->widget(
\yii\imperavi\Widget::className(), \yii\imperavi\Widget::className(),
[ [
'plugins' => ['fullscreen', 'fontcolor', 'video'], 'plugins' => ['fullscreen', 'fontcolor', 'video'],
...@@ -29,12 +29,12 @@ use yii\bootstrap\ActiveForm; ...@@ -29,12 +29,12 @@ use yii\bootstrap\ActiveForm;
] ]
) ?> ) ?>
<?php echo $form->field($model, 'view')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'view')->textInput(['maxlength' => true]) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,19 +15,19 @@ use yii\bootstrap\ActiveForm; ...@@ -15,19 +15,19 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'slug') ?> <?= $form->field($model, 'slug') ?>
<?php echo $form->field($model, 'title') ?> <?= $form->field($model, 'title') ?>
<?php echo $form->field($model, 'body') ?> <?= $form->field($model, 'body') ?>
<?php echo $form->field($model, 'status') ?> <?= $form->field($model, 'status') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="page-create"> <div class="page-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Page', 'modelClass' => 'Page',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="page-update"> <div class="page-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -13,16 +13,16 @@ $this->title = Yii::t('backend', 'Edit account') ...@@ -13,16 +13,16 @@ $this->title = Yii::t('backend', 'Edit account')
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'username') ?> <?= $form->field($model, 'username') ?>
<?php echo $form->field($model, 'email') ?> <?= $form->field($model, 'email') ?>
<?php echo $form->field($model, 'password')->passwordInput() ?> <?= $form->field($model, 'password')->passwordInput() ?>
<?php echo $form->field($model, 'password_confirm')->passwordInput() ?> <?= $form->field($model, 'password_confirm')->passwordInput() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Update'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Update'), ['class' => 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -12,18 +12,18 @@ $this->params['body-class'] = 'login-page'; ...@@ -12,18 +12,18 @@ $this->params['body-class'] = 'login-page';
?> ?>
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo">
<?php echo Html::encode($this->title) ?> <?= Html::encode($this->title) ?>
</div><!-- /.login-logo --> </div><!-- /.login-logo -->
<div class="header"></div> <div class="header"></div>
<div class="login-box-body"> <div class="login-box-body">
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?> <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<div class="body"> <div class="body">
<?php echo $form->field($model, 'username') ?> <?= $form->field($model, 'username') ?>
<?php echo $form->field($model, 'password')->passwordInput() ?> <?= $form->field($model, 'password')->passwordInput() ?>
<?php echo $form->field($model, 'rememberMe')->checkbox(['class'=>'simple']) ?> <?= $form->field($model, 'rememberMe')->checkbox(['class'=>'simple']) ?>
</div> </div>
<div class="footer"> <div class="footer">
<?php echo Html::submitButton(Yii::t('backend', 'Sign me in'), [ <?= Html::submitButton(Yii::t('backend', 'Sign me in'), [
'class' => 'btn btn-primary btn-flat btn-block', 'class' => 'btn btn-primary btn-flat btn-block',
'name' => 'login-button' 'name' => 'login-button'
]) ?> ]) ?>
......
...@@ -15,25 +15,25 @@ $this->title = Yii::t('backend', 'Edit profile') ...@@ -15,25 +15,25 @@ $this->title = Yii::t('backend', 'Edit profile')
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'picture')->widget(\trntv\filekit\widget\Upload::classname(), [ <?= $form->field($model, 'picture')->widget(\trntv\filekit\widget\Upload::classname(), [
'url'=>['avatar-upload'] 'url'=>['avatar-upload']
]) ?> ]) ?>
<?php echo $form->field($model, 'firstname')->textInput(['maxlength' => 255]) ?> <?= $form->field($model, 'firstname')->textInput(['maxlength' => 255]) ?>
<?php echo $form->field($model, 'middlename')->textInput(['maxlength' => 255]) ?> <?= $form->field($model, 'middlename')->textInput(['maxlength' => 255]) ?>
<?php echo $form->field($model, 'lastname')->textInput(['maxlength' => 255]) ?> <?= $form->field($model, 'lastname')->textInput(['maxlength' => 255]) ?>
<?php echo $form->field($model, 'locale')->dropDownlist(Yii::$app->params['availableLocales']) ?> <?= $form->field($model, 'locale')->dropDownlist(Yii::$app->params['availableLocales']) ?>
<?php echo $form->field($model, 'gender')->dropDownlist([ <?= $form->field($model, 'gender')->dropDownlist([
UserProfile::GENDER_FEMALE => Yii::t('backend', 'Female'), UserProfile::GENDER_FEMALE => Yii::t('backend', 'Female'),
UserProfile::GENDER_MALE => Yii::t('backend', 'Male') UserProfile::GENDER_MALE => Yii::t('backend', 'Male')
]) ?> ]) ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Update'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Update'), ['class' => 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,7 +15,7 @@ $this->title = $name; ...@@ -15,7 +15,7 @@ $this->title = $name;
<div class="error-content text-center"> <div class="error-content text-center">
<h3 class="headline"> <h3 class="headline">
<i class="fa fa-warning text-yellow"></i> <i class="fa fa-warning text-yellow"></i>
<?php echo Yii::t( <?= Yii::t(
'backend', 'backend',
'Error {code}', 'Error {code}',
[ [
...@@ -24,7 +24,7 @@ $this->title = $name; ...@@ -24,7 +24,7 @@ $this->title = $name;
?> ?>
</h3> </h3>
<p> <p>
<?php echo nl2br(Html::encode($message)) ?> <?= nl2br(Html::encode($message)) ?>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -6,7 +6,7 @@ $this->title = Yii::t('backend', 'Application settings'); ...@@ -6,7 +6,7 @@ $this->title = Yii::t('backend', 'Application settings');
?> ?>
<div class="box"> <div class="box">
<div class="box-body"> <div class="box-body">
<?php echo \common\components\keyStorage\FormWidget::widget([ <?= \common\components\keyStorage\FormWidget::widget([
'model' => $model, 'model' => $model,
'formClass' => '\yii\bootstrap\ActiveForm', 'formClass' => '\yii\bootstrap\ActiveForm',
'submitText' => Yii::t('backend', 'Save'), 'submitText' => Yii::t('backend', 'Save'),
......
...@@ -6,7 +6,7 @@ use yii\helpers\Html; ...@@ -6,7 +6,7 @@ use yii\helpers\Html;
$this->title = Yii::t('backend', 'System Information'); $this->title = Yii::t('backend', 'System Information');
?> ?>
<?php echo Yii::t( <?= Yii::t(
'backend', 'backend',
'Sorry, application failed to collect information about your system. See {link}.', 'Sorry, application failed to collect information about your system. See {link}.',
['link' => Html::a('trntv/probe', 'https://github.com/trntv/probe#user-content-supported-os')] ['link' => Html::a('trntv/probe', 'https://github.com/trntv/probe#user-content-supported-os')]
......
...@@ -19,18 +19,18 @@ $this->registerJsFile( ...@@ -19,18 +19,18 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Processor') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Processor') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'Processor') ?></dt> <dt><?= Yii::t('backend', 'Processor') ?></dt>
<dd><?php echo $provider->getCpuModel() ?></dd> <dd><?= $provider->getCpuModel() ?></dd>
<dt><?php echo Yii::t('backend', 'Processor Architecture') ?></dt> <dt><?= Yii::t('backend', 'Processor Architecture') ?></dt>
<dd><?php echo $provider->getArchitecture() ?></dd> <dd><?= $provider->getArchitecture() ?></dd>
<dt><?php echo Yii::t('backend', 'Number of cores') ?></dt> <dt><?= Yii::t('backend', 'Number of cores') ?></dt>
<dd><?php echo $provider->getCpuCores() ?></dd> <dd><?= $provider->getCpuCores() ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -39,18 +39,18 @@ $this->registerJsFile( ...@@ -39,18 +39,18 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Operating System') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Operating System') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'OS') ?></dt> <dt><?= Yii::t('backend', 'OS') ?></dt>
<dd><?php echo $provider->getOsType() ?></dd> <dd><?= $provider->getOsType() ?></dd>
<dt><?php echo Yii::t('backend', 'OS Release') ?></dt> <dt><?= Yii::t('backend', 'OS Release') ?></dt>
<dd><?php echo $provider->getOsRelease() ?></dd> <dd><?= $provider->getOsRelease() ?></dd>
<dt><?php echo Yii::t('backend', 'Kernel version') ?></dt> <dt><?= Yii::t('backend', 'Kernel version') ?></dt>
<dd><?php echo $provider->getOsKernelVersion() ?></dd> <dd><?= $provider->getOsKernelVersion() ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -59,18 +59,18 @@ $this->registerJsFile( ...@@ -59,18 +59,18 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Time') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Time') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'System Date') ?></dt> <dt><?= Yii::t('backend', 'System Date') ?></dt>
<dd><?php echo Yii::$app->formatter->asDate(time()) ?></dd> <dd><?= Yii::$app->formatter->asDate(time()) ?></dd>
<dt><?php echo Yii::t('backend', 'System Time') ?></dt> <dt><?= Yii::t('backend', 'System Time') ?></dt>
<dd><?php echo Yii::$app->formatter->asTime(time()) ?></dd> <dd><?= Yii::$app->formatter->asTime(time()) ?></dd>
<dt><?php echo Yii::t('backend', 'Timezone') ?></dt> <dt><?= Yii::t('backend', 'Timezone') ?></dt>
<dd><?php echo date_default_timezone_get() ?></dd> <dd><?= date_default_timezone_get() ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -79,21 +79,21 @@ $this->registerJsFile( ...@@ -79,21 +79,21 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Network') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Network') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'Hostname') ?></dt> <dt><?= Yii::t('backend', 'Hostname') ?></dt>
<dd><?php echo $provider->getHostname() ?></dd> <dd><?= $provider->getHostname() ?></dd>
<dt><?php echo Yii::t('backend', 'Internal IP') ?></dt> <dt><?= Yii::t('backend', 'Internal IP') ?></dt>
<dd><?php echo $provider->getServerIP() ?></dd> <dd><?= $provider->getServerIP() ?></dd>
<dt><?php echo Yii::t('backend', 'External IP') ?></dt> <dt><?= Yii::t('backend', 'External IP') ?></dt>
<dd><?php echo $provider->getExternalIP() ?></dd> <dd><?= $provider->getExternalIP() ?></dd>
<dt><?php echo Yii::t('backend', 'Port') ?></dt> <dt><?= Yii::t('backend', 'Port') ?></dt>
<dd><?php echo $provider->getServerVariable('SERVER_PORT') ?></dd> <dd><?= $provider->getServerVariable('SERVER_PORT') ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -102,21 +102,21 @@ $this->registerJsFile( ...@@ -102,21 +102,21 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Software') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Software') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'Web Server') ?></dt> <dt><?= Yii::t('backend', 'Web Server') ?></dt>
<dd><?php echo $provider->getServerSoftware() ?></dd> <dd><?= $provider->getServerSoftware() ?></dd>
<dt><?php echo Yii::t('backend', 'PHP Version') ?></dt> <dt><?= Yii::t('backend', 'PHP Version') ?></dt>
<dd><?php echo $provider->getPhpVersion() ?></dd> <dd><?= $provider->getPhpVersion() ?></dd>
<dt><?php echo Yii::t('backend', 'DB Type') ?></dt> <dt><?= Yii::t('backend', 'DB Type') ?></dt>
<dd><?php echo $provider->getDbType(Yii::$app->db->pdo) ?></dd> <dd><?= $provider->getDbType(Yii::$app->db->pdo) ?></dd>
<dt><?php echo Yii::t('backend', 'DB Version') ?></dt> <dt><?= Yii::t('backend', 'DB Version') ?></dt>
<dd><?php echo $provider->getDbVersion(Yii::$app->db->pdo) ?></dd> <dd><?= $provider->getDbVersion(Yii::$app->db->pdo) ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -125,21 +125,21 @@ $this->registerJsFile( ...@@ -125,21 +125,21 @@ $this->registerJsFile(
<div class="box box-primary"> <div class="box box-primary">
<div class="box-header"> <div class="box-header">
<i class="fa fa-hdd-o"></i> <i class="fa fa-hdd-o"></i>
<h3 class="box-title"><?php echo Yii::t('backend', 'Memory') ?></h3> <h3 class="box-title"><?= Yii::t('backend', 'Memory') ?></h3>
</div><!-- /.box-header --> </div><!-- /.box-header -->
<div class="box-body"> <div class="box-body">
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><?php echo Yii::t('backend', 'Total memory') ?></dt> <dt><?= Yii::t('backend', 'Total memory') ?></dt>
<dd><?php echo Yii::$app->formatter->asSize($provider->getTotalMem()) ?></dd> <dd><?= Yii::$app->formatter->asSize($provider->getTotalMem()) ?></dd>
<dt><?php echo Yii::t('backend', 'Free memory') ?></dt> <dt><?= Yii::t('backend', 'Free memory') ?></dt>
<dd><?php echo Yii::$app->formatter->asSize($provider->getFreeMem()) ?></dd> <dd><?= Yii::$app->formatter->asSize($provider->getFreeMem()) ?></dd>
<dt><?php echo Yii::t('backend', 'Total Swap') ?></dt> <dt><?= Yii::t('backend', 'Total Swap') ?></dt>
<dd><?php echo Yii::$app->formatter->asSize($provider->getTotalSwap()) ?></dd> <dd><?= Yii::$app->formatter->asSize($provider->getTotalSwap()) ?></dd>
<dt><?php echo Yii::t('backend', 'Free Swap') ?></dt> <dt><?= Yii::t('backend', 'Free Swap') ?></dt>
<dd><?php echo Yii::$app->formatter->asSize($provider->getFreeSwap()) ?></dd> <dd><?= Yii::$app->formatter->asSize($provider->getFreeSwap()) ?></dd>
</dl> </dl>
</div><!-- /.box-body --> </div><!-- /.box-body -->
</div> </div>
...@@ -151,10 +151,10 @@ $this->registerJsFile( ...@@ -151,10 +151,10 @@ $this->registerJsFile(
<div class="small-box bg-green"> <div class="small-box bg-green">
<div class="inner"> <div class="inner">
<h3> <h3>
<?php echo gmdate('H:i:s', $provider->getUptime()) ?> <?= gmdate('H:i:s', $provider->getUptime()) ?>
</h3> </h3>
<p> <p>
<?php echo Yii::t('backend', 'Uptime') ?> <?= Yii::t('backend', 'Uptime') ?>
</p> </p>
</div> </div>
<div class="icon"> <div class="icon">
...@@ -170,10 +170,10 @@ $this->registerJsFile( ...@@ -170,10 +170,10 @@ $this->registerJsFile(
<div class="small-box bg-aqua"> <div class="small-box bg-aqua">
<div class="inner"> <div class="inner">
<h3> <h3>
<?php echo $provider->getLoadAverage() ?> <?= $provider->getLoadAverage() ?>
</h3> </h3>
<p> <p>
<?php echo Yii::t('backend', 'Load average') ?> <?= Yii::t('backend', 'Load average') ?>
</p> </p>
</div> </div>
<div class="icon"> <div class="icon">
...@@ -190,17 +190,17 @@ $this->registerJsFile( ...@@ -190,17 +190,17 @@ $this->registerJsFile(
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<div class="inner"> <div class="inner">
<h3> <h3>
<?php echo User::find()->count() ?> <?= User::find()->count() ?>
</h3> </h3>
<p> <p>
<?php echo Yii::t('backend', 'User Registrations') ?> <?= Yii::t('backend', 'User Registrations') ?>
</p> </p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="ion ion-person-add"></i> <i class="ion ion-person-add"></i>
</div> </div>
<a href="<?php echo Yii::$app->urlManager->createUrl(['/user/index']) ?>" class="small-box-footer"> <a href="<?= Yii::$app->urlManager->createUrl(['/user/index']) ?>" class="small-box-footer">
<?php echo Yii::t('backend', 'More info') ?> <i class="fa fa-arrow-circle-right"></i> <?= Yii::t('backend', 'More info') ?> <i class="fa fa-arrow-circle-right"></i>
</a> </a>
</div> </div>
</div><!-- ./col --> </div><!-- ./col -->
...@@ -209,17 +209,17 @@ $this->registerJsFile( ...@@ -209,17 +209,17 @@ $this->registerJsFile(
<div class="small-box bg-red"> <div class="small-box bg-red">
<div class="inner"> <div class="inner">
<h3> <h3>
<?php echo FileStorageItem::find()->count() ?> <?= FileStorageItem::find()->count() ?>
</h3> </h3>
<p> <p>
<?php echo Yii::t('backend', 'Files in storage') ?> <?= Yii::t('backend', 'Files in storage') ?>
</p> </p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="ion ion-pie-graph"></i> <i class="ion ion-pie-graph"></i>
</div> </div>
<a href="<?php echo Yii::$app->urlManager->createUrl(['/file-storage/index']) ?>" class="small-box-footer"> <a href="<?= Yii::$app->urlManager->createUrl(['/file-storage/index']) ?>" class="small-box-footer">
<?php echo Yii::t('backend', 'More info') ?> <i class="fa fa-arrow-circle-right"></i> <?= Yii::t('backend', 'More info') ?> <i class="fa fa-arrow-circle-right"></i>
</a> </a>
</div> </div>
</div><!-- ./col --> </div><!-- ./col -->
...@@ -229,16 +229,16 @@ $this->registerJsFile( ...@@ -229,16 +229,16 @@ $this->registerJsFile(
<div id="cpu-usage" class="box box-primary"> <div id="cpu-usage" class="box box-primary">
<div class="box-header"> <div class="box-header">
<h3 class="box-title"> <h3 class="box-title">
<?php echo Yii::t('backend', 'CPU Usage') ?> <?= Yii::t('backend', 'CPU Usage') ?>
</h3> </h3>
<div class="box-tools pull-right"> <div class="box-tools pull-right">
<?php echo Yii::t('backend', 'Real time') ?> <?= Yii::t('backend', 'Real time') ?>
<div class="realtime btn-group" data-toggle="btn-toggle"> <div class="realtime btn-group" data-toggle="btn-toggle">
<button type="button" class="btn btn-default btn-xs active" data-toggle="on"> <button type="button" class="btn btn-default btn-xs active" data-toggle="on">
<?php echo Yii::t('backend', 'On') ?> <?= Yii::t('backend', 'On') ?>
</button> </button>
<button type="button" class="btn btn-default btn-xs" data-toggle="off"> <button type="button" class="btn btn-default btn-xs" data-toggle="off">
<?php echo Yii::t('backend', 'Off') ?> <?= Yii::t('backend', 'Off') ?>
</button> </button>
</div> </div>
</div> </div>
...@@ -255,16 +255,16 @@ $this->registerJsFile( ...@@ -255,16 +255,16 @@ $this->registerJsFile(
<div id="memory-usage" class="box box-primary"> <div id="memory-usage" class="box box-primary">
<div class="box-header"> <div class="box-header">
<h3 class="box-title"> <h3 class="box-title">
<?php echo Yii::t('backend', 'Memory Usage') ?> <?= Yii::t('backend', 'Memory Usage') ?>
</h3> </h3>
<div class="box-tools pull-right"> <div class="box-tools pull-right">
<?php echo Yii::t('backend', 'Real time') ?> <?= Yii::t('backend', 'Real time') ?>
<div class="btn-group realtime" data-toggle="btn-toggle"> <div class="btn-group realtime" data-toggle="btn-toggle">
<button type="button" class="btn btn-default btn-xs active" data-toggle="on"> <button type="button" class="btn btn-default btn-xs active" data-toggle="on">
<?php echo Yii::t('backend', 'On') ?> <?= Yii::t('backend', 'On') ?>
</button> </button>
<button type="button" class="btn btn-default btn-xs" data-toggle="off"> <button type="button" class="btn btn-default btn-xs" data-toggle="off">
<?php echo Yii::t('backend', 'Off') ?> <?= Yii::t('backend', 'Off') ?>
</button> </button>
</div> </div>
</div> </div>
......
...@@ -7,25 +7,25 @@ ...@@ -7,25 +7,25 @@
<div class="timeline-item"> <div class="timeline-item">
<span class="time"> <span class="time">
<i class="fa fa-clock-o"></i> <i class="fa fa-clock-o"></i>
<?php echo Yii::$app->formatter->asRelativeTime($model->created_at) ?> <?= Yii::$app->formatter->asRelativeTime($model->created_at) ?>
</span> </span>
<h3 class="timeline-header"> <h3 class="timeline-header">
<?php echo Yii::t('backend', 'You have new event') ?> <?= Yii::t('backend', 'You have new event') ?>
</h3> </h3>
<div class="timeline-body"> <div class="timeline-body">
<dl> <dl>
<dt><?php echo Yii::t('backend', 'Application') ?>:</dt> <dt><?= Yii::t('backend', 'Application') ?>:</dt>
<dd><?php echo $model->application ?></dd> <dd><?= $model->application ?></dd>
<dt><?php echo Yii::t('backend', 'Category') ?>:</dt> <dt><?= Yii::t('backend', 'Category') ?>:</dt>
<dd><?php echo $model->category ?></dd> <dd><?= $model->category ?></dd>
<dt><?php echo Yii::t('backend', 'Event') ?>:</dt> <dt><?= Yii::t('backend', 'Event') ?>:</dt>
<dd><?php echo $model->event ?></dd> <dd><?= $model->event ?></dd>
<dt><?php echo Yii::t('backend', 'Date') ?>:</dt> <dt><?= Yii::t('backend', 'Date') ?>:</dt>
<dd><?php echo Yii::$app->formatter->asDatetime($model->created_at) ?></dd> <dd><?= Yii::$app->formatter->asDatetime($model->created_at) ?></dd>
</dl> </dl>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm; ...@@ -15,15 +15,15 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'application') ?> <?= $form->field($model, 'application') ?>
<?php echo $form->field($model, 'event') ?> <?= $form->field($model, 'event') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -20,7 +20,7 @@ $icons = [ ...@@ -20,7 +20,7 @@ $icons = [
<!-- timeline time label --> <!-- timeline time label -->
<li class="time-label"> <li class="time-label">
<span class="bg-blue"> <span class="bg-blue">
<?php echo Yii::$app->formatter->asDate($model->created_at) ?> <?= Yii::$app->formatter->asDate($model->created_at) ?>
</span> </span>
</li> </li>
<?php $date = Yii::$app->formatter->asDate($model->created_at) ?> <?php $date = Yii::$app->formatter->asDate($model->created_at) ?>
...@@ -42,11 +42,11 @@ $icons = [ ...@@ -42,11 +42,11 @@ $icons = [
</li> </li>
</ul> </ul>
<?php else: ?> <?php else: ?>
<?php echo Yii::t('backend', 'No events found') ?> <?= Yii::t('backend', 'No events found') ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="col-md-12 text-center"> <div class="col-md-12 text-center">
<?php echo \yii\widgets\LinkPager::widget([ <?= \yii\widgets\LinkPager::widget([
'pagination'=>$dataProvider->pagination, 'pagination'=>$dataProvider->pagination,
'options' => ['class' => 'pagination'] 'options' => ['class' => 'pagination']
]) ?> ]) ?>
......
...@@ -7,22 +7,22 @@ ...@@ -7,22 +7,22 @@
<div class="timeline-item"> <div class="timeline-item">
<span class="time"> <span class="time">
<i class="fa fa-clock-o"></i> <i class="fa fa-clock-o"></i>
<?php echo Yii::$app->formatter->asRelativeTime($model->created_at) ?> <?= Yii::$app->formatter->asRelativeTime($model->created_at) ?>
</span> </span>
<h3 class="timeline-header"> <h3 class="timeline-header">
<?php echo Yii::t('backend', 'You have new user!') ?> <?= Yii::t('backend', 'You have new user!') ?>
</h3> </h3>
<div class="timeline-body"> <div class="timeline-body">
<?php echo Yii::t('backend', 'New user ({identity}) was registered at {created_at}', [ <?= Yii::t('backend', 'New user ({identity}) was registered at {created_at}', [
'identity' => $model->data['public_identity'], 'identity' => $model->data['public_identity'],
'created_at' => Yii::$app->formatter->asDatetime($model->data['created_at']) 'created_at' => Yii::$app->formatter->asDatetime($model->data['created_at'])
]) ?> ]) ?>
</div> </div>
<div class="timeline-footer"> <div class="timeline-footer">
<?php echo \yii\helpers\Html::a( <?= \yii\helpers\Html::a(
Yii::t('backend', 'View user'), Yii::t('backend', 'View user'),
['/user/view', 'id' => $model->data['user_id']], ['/user/view', 'id' => $model->data['user_id']],
['class' => 'btn btn-success btn-sm'] ['class' => 'btn btn-success btn-sm']
......
...@@ -14,13 +14,13 @@ use yii\bootstrap\ActiveForm; ...@@ -14,13 +14,13 @@ use yii\bootstrap\ActiveForm;
<div class="user-form"> <div class="user-form">
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'username') ?> <?= $form->field($model, 'username') ?>
<?php echo $form->field($model, 'email') ?> <?= $form->field($model, 'email') ?>
<?php echo $form->field($model, 'password')->passwordInput() ?> <?= $form->field($model, 'password')->passwordInput() ?>
<?php echo $form->field($model, 'status')->dropDownList(User::statuses()) ?> <?= $form->field($model, 'status')->dropDownList(User::statuses()) ?>
<?php echo $form->field($model, 'roles')->checkboxList($roles) ?> <?= $form->field($model, 'roles')->checkboxList($roles) ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Save'), ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?> <?= Html::submitButton(Yii::t('backend', 'Save'), ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -15,25 +15,25 @@ use yii\bootstrap\ActiveForm; ...@@ -15,25 +15,25 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'username') ?> <?= $form->field($model, 'username') ?>
<?php echo $form->field($model, 'auth_key') ?> <?= $form->field($model, 'auth_key') ?>
<?php echo $form->field($model, 'email') ?> <?= $form->field($model, 'email') ?>
<?php echo $form->field($model, 'role') ?> <?= $form->field($model, 'role') ?>
<?php echo $form->field($model, 'status') ?> <?= $form->field($model, 'status') ?>
<?php echo $form->field($model, 'created_at') ?> <?= $form->field($model, 'created_at') ?>
<?php echo $form->field($model, 'updated_at') ?> <?= $form->field($model, 'updated_at') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="user-create"> <div class="user-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'roles' => $roles 'roles' => $roles
]) ?> ]) ?>
......
...@@ -17,12 +17,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -17,12 +17,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'User', 'modelClass' => 'User',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = ['label'=>Yii::t('backend', 'Update')]; ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = ['label'=>Yii::t('backend', 'Update')];
?> ?>
<div class="user-update"> <div class="user-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
'roles' => $roles 'roles' => $roles
]) ?> ]) ?>
......
...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,8 +13,8 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="user-view"> <div class="user-view">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?php echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [ <?= Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger', 'class' => 'btn btn-danger',
'data' => [ 'data' => [
'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'), 'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
]) ?> ]) ?>
</p> </p>
<?php echo DetailView::widget([ <?= DetailView::widget([
'model' => $model, 'model' => $model,
'attributes' => [ 'attributes' => [
'id', 'id',
......
...@@ -12,12 +12,12 @@ use yii\bootstrap\ActiveForm; ...@@ -12,12 +12,12 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?> <?= $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="widget-carousel-create"> <div class="widget-carousel-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -13,12 +13,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -13,12 +13,12 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="widget-carousel-index"> <div class="widget-carousel-index">
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Widget Carousel', 'modelClass' => 'Widget Carousel',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'options' => [ 'options' => [
......
...@@ -12,20 +12,20 @@ use yii\helpers\Html; ...@@ -12,20 +12,20 @@ use yii\helpers\Html;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->errorSummary($model) ?> <?= $form->errorSummary($model) ?>
<?php echo $form->field($model, 'image')->widget( <?= $form->field($model, 'image')->widget(
\trntv\filekit\widget\Upload::className(), \trntv\filekit\widget\Upload::className(),
[ [
'url'=>['/file-storage/upload'], 'url'=>['/file-storage/upload'],
] ]
) ?> ) ?>
<?php echo $form->field($model, 'order')->textInput() ?> <?= $form->field($model, 'order')->textInput() ?>
<?php echo $form->field($model, 'url')->textInput(['maxlength' => 1024]) ?> <?= $form->field($model, 'url')->textInput(['maxlength' => 1024]) ?>
<?php echo $form->field($model, 'caption')->widget( <?= $form->field($model, 'caption')->widget(
\yii\imperavi\Widget::className(), \yii\imperavi\Widget::className(),
[ [
'plugins' => ['fullscreen', 'fontcolor', 'video'], 'plugins' => ['fullscreen', 'fontcolor', 'video'],
...@@ -38,10 +38,10 @@ use yii\helpers\Html; ...@@ -38,10 +38,10 @@ use yii\helpers\Html;
] ]
]) ?> ]) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Create'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Create');
?> ?>
<div class="widget-carousel-item-create"> <div class="widget-carousel-item-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,7 +14,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="widget-carousel-item-update"> <div class="widget-carousel-item-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -14,17 +14,17 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -14,17 +14,17 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="widget-carousel-update"> <div class="widget-carousel-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Widget Carousel Item', 'modelClass' => 'Widget Carousel Item',
]), ['/widget-carousel-item/create', 'carousel_id'=>$model->id], ['class' => 'btn btn-success']) ?> ]), ['/widget-carousel-item/create', 'carousel_id'=>$model->id], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $carouselItemsProvider, 'dataProvider' => $carouselItemsProvider,
'options' => [ 'options' => [
'class' => 'grid-view table-responsive' 'class' => 'grid-view table-responsive'
......
...@@ -12,23 +12,23 @@ use yii\bootstrap\ActiveForm; ...@@ -12,23 +12,23 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->errorSummary($model) ?> <?= $form->errorSummary($model) ?>
<?php echo $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?> <?= $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => 512]) ?> <?= $form->field($model, 'title')->textInput(['maxlength' => 512]) ?>
<?php echo $form->field($model, 'items')->widget( <?= $form->field($model, 'items')->widget(
trntv\aceeditor\AceEditor::className(), trntv\aceeditor\AceEditor::className(),
[ [
'mode' => 'json' 'mode' => 'json'
] ]
) ?> ) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="widget-menu-create"> <div class="widget-menu-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="widget-menu-update"> <div class="widget-menu-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
...@@ -12,21 +12,21 @@ use yii\bootstrap\ActiveForm; ...@@ -12,21 +12,21 @@ use yii\bootstrap\ActiveForm;
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<?php echo $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?> <?= $form->field($model, 'key')->textInput(['maxlength' => 1024]) ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => 512]) ?> <?= $form->field($model, 'title')->textInput(['maxlength' => 512]) ?>
<?php echo $form->field($model, 'body')->widget( <?= $form->field($model, 'body')->widget(
trntv\aceeditor\AceEditor::className(), trntv\aceeditor\AceEditor::className(),
[ [
'mode' => 'html' 'mode' => 'html'
] ]
) ?> ) ?>
<?php echo $form->field($model, 'status')->checkbox() ?> <?= $form->field($model, 'status')->checkbox() ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton( <?= Html::submitButton(
$model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), $model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'),
['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary'] ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']
) ?> ) ?>
......
...@@ -14,19 +14,19 @@ use yii\bootstrap\ActiveForm; ...@@ -14,19 +14,19 @@ use yii\bootstrap\ActiveForm;
'method' => 'get', 'method' => 'get',
]); ?> ]); ?>
<?php echo $form->field($model, 'id') ?> <?= $form->field($model, 'id') ?>
<?php echo $form->field($model, 'key') ?> <?= $form->field($model, 'key') ?>
<?php echo $form->field($model, 'title') ?> <?= $form->field($model, 'title') ?>
<?php echo $form->field($model, 'body') ?> <?= $form->field($model, 'body') ?>
<?php echo $form->field($model, 'status') ?> <?= $form->field($model, 'status') ?>
<div class="form-group"> <div class="form-group">
<?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
<?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?> <?= Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
</div> </div>
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
......
...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -10,7 +10,7 @@ $this->params['breadcrumbs'][] = $this->title;
?> ?>
<div class="text-block-create"> <div class="text-block-create">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model 'model' => $model
]) ?> ]) ?>
......
...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -15,12 +15,12 @@ $this->params['breadcrumbs'][] = $this->title;
<?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p> <p>
<?php echo Html::a(Yii::t('backend', 'Create {modelClass}', [ <?= Html::a(Yii::t('backend', 'Create {modelClass}', [
'modelClass' => 'Text Block', 'modelClass' => 'Text Block',
]), ['create'], ['class' => 'btn btn-success']) ?> ]), ['create'], ['class' => 'btn btn-success']) ?>
</p> </p>
<?php echo GridView::widget([ <?= GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterModel' => $searchModel, 'filterModel' => $searchModel,
'columns' => [ 'columns' => [
......
...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update'); ...@@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = Yii::t('backend', 'Update');
?> ?>
<div class="text-block-update"> <div class="text-block-update">
<?php echo $this->render('_form', [ <?= $this->render('_form', [
'model' => $model, 'model' => $model,
]) ?> ]) ?>
......
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