Automatically creates and manages new hook points for modified shops.
With this module, developers can easily create and manage new hook points for the auto_include system of modified eCommerce shops. With the help of this module, all modules can be developed to be updateable.
You can install this module with the Modified Module Loader Client (MMLC).
Search for: robinthehood/hook-point-manager
In this example you can create hook points from .../DefaultHookPoints/. It's better to look here for a hook point or make a pull request to add a new hook point:
use RobinTheHood\HookPointManager\Classes\HookPointManager;
$hookPointManager = new HookPointManager();
$hookPointManager->registerDefault();
$hookPointManager->update();
If you need a very special hook point, you can create your own with the following code:
$hookPointManager = new HookPointManager();
$hookPointManager->registerHookPoint([
'name' => 'mc-my-hook-point-name',
'module' => 'my-company/my-first-module',
'file' => '/create_account.php',
'hash' => '2b5ce65ba6177ed24c805609b28572a7',
'line' => 30,
'include' => '/includes/extra/my-company/my-first-module/create_account/'
], ['2.0.4.1', '2.0.4.2', '2.0.5.1']);
index | description | example value |
---|---|---|
name | unique name of the hook point | mc-my-hook-point-name |
module | module name of hook poit creator | my-company/my-first-module |
file | file path in which the hook point is to be installed | /create_account.php |
hash | md5-Hash of original unmodified file | 2b5ce65ba6177ed24c805609b28572a7 |
line | line after which the hook point is to be installed | 30 |
include | auto_include directory for the hook point files | /includes/extra/.../create_account/ |