Skip to content

Automatically creates and manages new hook points for modified shops

Notifications You must be signed in to change notification settings

shopbetreuung/hook-point-manager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hook-point-manager

dicord

Automatically creates and manages new hook points for modified shops.

About

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.

Installation

You can install this module with the Modified Module Loader Client (MMLC).

Search for: robinthehood/hook-point-manager

How to use

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();

Create own Hook Point

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']);

Reference

array $hookPoint

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/

HookPointManager::registerHookPoint(array $hookPoint, array $versions)

About

Automatically creates and manages new hook points for modified shops

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%