cartrabbit / hook
Do action and filters with Herbert
dev-master
2019-10-02 07:53 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-02 09:35:51 UTC
README
Add the below piece of code in cartrabbit.config.php to load Cartrabbit Hook service provider
'providers' => array(
Cartrabbit\Hook\HookServiceProvider::class
)
Cartrabbit Hook Example
\Cartrabbit\Hook\Facades\Action::add('init', 'ClassName@functionName');
\Cartrabbit\Hook\Facades\Action::run('eventname', $args);
\Cartrabbit\Hook\Facades\Filter::add('eventname', 'ClassName@functionName');
\Cartrabbit\Hook\Facades\Filter::run('eventname', $args);