PHP code example of luckcodes / yii2-events-manager
1. Go to this page and download the library: Download luckcodes/yii2-events-manager library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
luckcodes / yii2-events-manager example snippets
php composer.phar
namespace luckcodes\themeblocks\src\handlers;
use luckcodes\eventsmanager\classes\AddHandlers;
class EventsManagerHandler extends AddHandlers
{
public function connect()
{
$this->addEventHandler(
'common\components\MenuBuilder',
'menu_build',
'common\modules\item\eventhandler\MenuBuilderComponent',
'addOptionsMenu'
);
}
}