wdmg/yii2-services

System Service Manager

Installs: 22

Dependents: 1

Suggesters: 0

Stars: 2

Watchers: 3

Forks: 2

Open Issues: 0

Type:yii2-extension

1.1.7 2019-07-16 13:13 UTC

README

Progress Github all releases GitHub version Progress GitHub license

Yii2 Services Module

System Service Manager for Yii2

Requirements

Installation

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:

  1. Restore directory rights
  2. Clear runtime cache
  3. Clear web cache
  4. Clear the all system cache

Configure

To add a module to the project, add the following data in your configuration file:

'modules' => [
    ...
    'services' => [
        'class' => 'wdmg\services\Module',
        'routePrefix' => 'admin'
    ],
    ...
],

Routing

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(),
            ...
        ]
    ]);
?>

Status and version [in progress development]

  • 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