pantera-digital/yii2-events

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2017-12-04 12:32 UTC

This package is auto-updated.

Last update: 2021-07-17 12:02:52 UTC


README

Events management module for Yii Framework 2.x

Установка

Предпочтительно через composer:

$ composer require pantera-digital/yii2-events "dev-master"

Использование

Запустить миграции:

$ php yii migrate/up --migrationPath=@vendor/pantera-digital/yii2-events/migrations

Добавить в YOUR_APP/config/main.php (или YOUR_APP/config/main-local.php) в параметр modules:

'modules' => [
    ...
    'events' => [
        'class' => 'pantera\events\Module',
        'events' => [
            \your\model\namespace\YourModel::className() => [
                \your\model\namespace\YourModel::YOUR_MODEL_EVENT_KEY
            ],
        ],
    ],
    ...
],

Добавить в YOUR_APP/config/main.php (или YOUR_APP/config/main-local.php) в параметр bootstrap:

'bootstrap' => [..., 'events'],

При этом все вызовы сконфигурированных событий будут записаны в таблицу {{%system_event}}