PHP code example of liventin / base.module.handlers
1. Go to this page and download the library: Download liventin/base.module.handlers 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/ */
liventin / base.module.handlers example snippets
namespace ${MODULE_PROVIDER_CAMMAL_CASE}\\${MODULE_CODE_CAMMAL_CASE}\Handlers;
use ${MODULE_PROVIDER_CAMMAL_CASE}\\${MODULE_CODE_CAMMAL_CASE}\Service\Handlers\Handler;
class HandlerExample
{
#[Handler(module: 'main', event: 'OnBeforeUserAdd')]
public static function onUserAdd(array &${DS}fields): void
{
// logic
}
}