pravda1979 / yii2-book
Модуль "Книги" для CMF2
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.1.0
- voskobovich/yii2-many-many-behavior: ~3.0
- yii2-developer/yii2-editor: ~2.0.0
- yii2-developer/yii2-system: ~1.0.0
- yiisoft/yii2: ~2.0.12
This package is not auto-updated.
Last update: 2025-03-26 01:08:28 UTC
README
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist pravda1979/yii2-book "*"
or add
"pravda1979/yii2-book": "*"
to the require section of your composer.json
file.
Use:
backend:
'modules' => [
'book' => [
'class' => \pravda1979\book\Module::class,
'viewPath' => '@pravda1979/book/views/backend',
'controllerNamespace' => 'pravda1979\book\controllers\backend',
],
],
console:
'controllerMap' => [
'migrate' => [
'class' => \yii\console\controllers\MigrateController::class,
'migrationTable' => '{{%migration}}',
'useTablePrefix' => true,
'interactive' => false,
'migrationPath' => [
'@pravda1979/book/migrations',
],
],
...
'access' => [
'class' => \krok\access\AccessController::class,
'userIds' => [
1,
],
'rules' => [
\krok\auth\rbac\AuthorRule::class,
],
'config' => [
[
'label' => 'Book',
'name' => 'book',
'controllers' => [
'default' => [
'label' => 'Book',
'actions' => [],
],
'author' => [
'label' => 'Book Author',
'actions' => [],
],
'genre' => [
'label' => 'Book Genre',
'actions' => [],
],
],
],
],
],
],
frontend:
'modules' => [
'book' => [
'class' => \pravda1979\book\Module::class,
'viewPath' => '@pravda1979/book/views/frontend',
'controllerNamespace' => 'pravda1979\book\controllers\frontend',
],
],
params:
'menu' => [
[
'label' => 'Library',
'icon' => 'ti-book',
'items' => [
[
'label' => 'Book',
'url' => ['/book/default'],
],
[
'label' => 'Book Author',
'url' => ['/book/author'],
],
[
'label' => 'Book Genre',
'url' => ['/book/genre'],
],
],
],
],
add translates in file messages/{lang}/system.php
:
/**
* Модуль книг
*/
'Library' => 'Библиотека',
'Book' => 'Книги',
'Book Author' => 'Авторы',
'Book Genre' => 'Жанры',
Замечания, вопросы
- В README модуля news неверно указано как создавать меню.
- Если используется Pjax, не работает HiddenColumn в GridView. Вместо Select2 обычный Dropdown.
- На "index" страницах не хватает кнопки сброса фильтра по всем полям.
- На "index" страницах не хватает формы фильтра, чтоб фильтровать одним махом по многим полям, задавать доп. условия, такие как промежуток дат и тд. и т.п.