dev-master
9999999-dev https://github.com/ceyhunism/yii2-gentellela-crud-templateCRUD template to Gentellela integrated with yii2
The Requires
by Ceyhun Ismayilzade
extension yii2 gii crud template
Wallogit.com
2017 © Pedro Peláez
CRUD template to Gentellela integrated with yii2
Gentellela Admin https://github.com/puikinsh/gentelella, (*1)
Интеграция Gentellela шаблона к CRUD в Gii., (*2)
Нужно выполнить:, (*3)
composer require ceyhunism/yii2-gentellela-crud-template
или добавить в composer.json в "required", (*4)
"ceyhunism/yii2-gentellela-crud-template": "dev-master"
Альтернативный способ установки: Скопировать весь проект ceyhunism/yii2-gentellela-crud-template в папку @vendor, (*5)
В конфигурационном файле /config/main.php нужно добавить:, (*6)
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'generators' => [
'crud' => [
'class' => 'yii\gii\generators\crud\Generator',
'templates' => [
'custom' => '@vendor/ceyhunism/yii2-gentellela-crud-template',
]
]
],
];
После этого при использовании CRUD в Gii в разделе "Code Template" необходимо выбрать соответствующий шаблон., (*7)
Для использования flash сообщений в базовом контроллере, который расширяют другие контроллеры необходимо объявить функцию set_session, (*8)
protected function set_session($type, $message)
{
Yii::$app->session->setFlash($type, Html::encode($message));
}
CRUD template to Gentellela integrated with yii2
extension yii2 gii crud template