Skip to content
This repository was archived by the owner on Jan 10, 2022. It is now read-only.

Commit e27aa57

Browse files
committed
update README
1 parent f936477 commit e27aa57

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,22 @@ class ItemController extends Controller
8686
{
8787
return [
8888
'index' => [
89-
'class' => 'yii2tech\admin\actions\Index',
89+
'class' => \yii2tech\admin\actions\Index::class,
9090
'newSearchModel' => function () {
9191
return new ItemSearch();
9292
},
9393
],
9494
'view' => [
95-
'class' => 'yii2tech\admin\actions\View',
95+
'class' => \yii2tech\admin\actions\View::class,
9696
],
9797
'create' => [
98-
'class' => 'yii2tech\admin\actions\Create',
98+
'class' => \yii2tech\admin\actions\Create::class,
9999
],
100100
'update' => [
101-
'class' => 'yii2tech\admin\actions\Update',
101+
'class' => \yii2tech\admin\actions\Update::class,
102102
],
103103
'delete' => [
104-
'class' => 'yii2tech\admin\actions\Delete',
104+
'class' => \yii2tech\admin\actions\Delete::class,
105105
],
106106
];
107107
}
@@ -110,9 +110,8 @@ class ItemController extends Controller
110110
{
111111
if (($model = Item::findOne($id)) !== null) {
112112
return $model;
113-
} else {
114-
throw new NotFoundHttpException('The requested page does not exist.');
115113
}
114+
throw new NotFoundHttpException('The requested page does not exist.');
116115
}
117116

118117
public function newModel()
@@ -161,13 +160,13 @@ return [
161160
'modules' => [
162161
// ...
163162
'gii' => [
164-
'class' => 'yii\gii\Module',
163+
'class' => yii\gii\Module::class,
165164
'generators' => [
166165
'adminMainFrame' => [
167-
'class' => 'yii2tech\admin\gii\mainframe\Generator'
166+
'class' => yii2tech\admin\gii\mainframe\Generator::class
168167
],
169168
'adminCrud' => [
170-
'class' => 'yii2tech\admin\gii\crud\Generator'
169+
'class' => yii2tech\admin\gii\crud\Generator::class
171170
]
172171
],
173172
],
@@ -194,7 +193,7 @@ return [
194193
'i18n' => [
195194
'translations' => [
196195
'yii2tech-admin' => [
197-
'class' => 'yii\i18n\PhpMessageSource',
196+
'class' => yii\i18n\PhpMessageSource::class,
198197
'basePath' => '@yii2tech/admin/messages',
199198
],
200199
// ...

0 commit comments

Comments
 (0)