2017 © Pedro Peláez
 

yii2-extension pages

Pages module

image

bulldozer/pages

Pages module

  • Sunday, February 11, 2018
  • by webdragons
  • Repository
  • 1 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Pages module

Модуль управления страницами для Bulldozer CMF, (*1)

Установка

Подключить в composer:, (*2)

composer require bulldozer/pages "*"

Добавить в backend\config\main.php:, (*3)

return [
    'components' => [
        'menu' => [
            'class' => \bulldozer\components\BackendMenu::class,
            'modules' => [
                'pages',
            ]
        ],
    ],
    'modules' => [
        'pages' => [
            'class' => \bulldozer\pages\backend\Module::class,
        ],
    ],
]

Добавить в frontend\config\main.php:, (*4)

return [
    'components' => [
        'urlManager' => [
            'rules' => [
                [
                    'class' => \bulldozer\pages\frontend\PageUrlRule::class,
                    'pattern' => '<param1:[\w_-]+>/',
                    'route' => 'pages/pages/view-with-one-param',
                ],
                [
                    'class' => \bulldozer\pages\frontend\PageUrlRule::class,
                    'pattern' => '<param1:[\w_-]+>/<param2:[\w_-]+>',
                    'route' => 'pages/pages/view-with-two-params',
                ],
                ...
            ],
        ],
    ],
    'modules' => [
        'pages' => [
            'class' => \bulldozer\pages\frontend\Module::class',
        ],
    ],
]

Добавить в console\config\main.php:, (*5)

return [
    'controllerMap' => [
        ...
        'migrate' => [
            'class' => \yii\console\controllers\MigrateController::class,
            'migrationNamespaces' => [
                ...
                'bulldozer\pages\console\migrations',
                ...
            ],
        ],
        ...
    ],
]

The Versions