Commit d8e9162c authored by Shakarim Sapa's avatar Shakarim Sapa

Добавлен модуль triggers

parent 9211eac1
...@@ -22,6 +22,7 @@ return [ ...@@ -22,6 +22,7 @@ return [
'main' => ['class' => 'common\modules\main\main'], 'main' => ['class' => 'common\modules\main\main'],
'rbac' => ['class' => 'common\modules\rbac\rbac'], 'rbac' => ['class' => 'common\modules\rbac\rbac'],
'utility' => ['class' => 'c006\utility\migration\Module'], 'utility' => ['class' => 'c006\utility\migration\Module'],
'triggers' => ['class' => 'common\modules\triggers\Module'],
], ],
'components' => [ 'components' => [
'session' => [ 'session' => [
......
<?php
namespace common\modules\triggers;
/**
* triggers module definition class
*/
class Module extends \common\components\WebModule
{
/**
* @inheritdoc
*/
public $controllerNamespace = 'common\modules\triggers\controllers';
public static $active = true;
public $menu_icons = 'fa fa-file-o';
/**
* @inheritdoc
*/
public function init()
{
parent::init();
// custom initialization code goes here
}
public static function name()
{
return 'Управление триггерами';
}
public static function description()
{
return 'Управление триггерами';
}
public static function version()
{
return '1.0';
}
public static function adminMenu()
{
return array(
);
}
}
<?php
namespace common\modules\triggers\controllers;
use common\components\BaseController;
/**
* Default controller for the `triggers` module
*/
class DefaultController extends BaseController
{
public static function actionsTitles(){
return [
'index' => 'Главная страница модуля'
];
}
/**
* Renders the index view for the module
* @return string
*/
public function actionIndex()
{
return $this->render('index');
}
}
<div class="triggers-default-index">
<h1><?= $this->context->action->uniqueId ?></h1>
<p>
This is the view content for action "<?= $this->context->action->id ?>".
The action belongs to the controller "<?= get_class($this->context) ?>"
in the "<?= $this->context->module->id ?>" module.
</p>
<p>
You may customize this page by editing the following file:<br>
<code><?= __FILE__ ?></code>
</p>
</div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"require-dev": { "require-dev": {
"yiisoft/yii2-codeception": "*", "yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*", "yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*", "yiisoft/yii2-gii": "^2.0",
"yiisoft/yii2-faker": "*" "yiisoft/yii2-faker": "*"
}, },
"config": { "config": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment