System Service Manager for Yii2
- PHP 5.6 or higher
- Yii2 v.2.0.20 and newest
- Yii2 Base module (required)
- Yii2 Activity module (support/optionaly)
- Yii2 Stats module (support/optionaly)
- Yii2 Users module (support/optionaly)
To install the module, run the following command in the console:
$ composer require "wdmg/yii2-services"
After configure db connection, run the following command in the console:
$ php yii services/init
And select the operation you want to perform:
- Restore directory rights
- Clear runtime cache
- Clear web cache
- Clear the all system cache
To add a module to the project, add the following data in your configuration file:
'modules' => [
...
'services' => [
'class' => 'wdmg\services\Module',
'routePrefix' => 'admin'
],
...
],
Use the Module::dashboardNavItems()
method of the module to generate a navigation items list for NavBar, like this:
<?php
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'label' => 'Modules',
'items' => [
Yii::$app->getModule('services')->dashboardNavItems(),
...
]
]);
?>
- v.1.1.7 - Added extra options to composer.json and navbar menu icon
- v.1.1.6 - Added choice param for non interactive mode
- v.1.1.5 - Module refactoring