ePages 6.11.0 - DE_EPAGES/Trigger/API/Table/Hook.pm

Package DE_EPAGES::Trigger::API::Table::Hook

interface for table Hook

@EXPORT_OK
InsertHook
UpdateHook
DeleteHook
GetAllPKeyHooks
GetAllInfoHooks
GetInfoHook
ExistsHook
GetPKeyHookByName
GetInfoHookByName
ExistsHookByName
GetPKeyHooksByName
GetInfoHooksByName

Functions

DeleteHook
ExistsHook
ExistsHookByName
GetAllInfoHooks
GetAllPKeyHooks
GetInfoHook
GetInfoHookByName
GetInfoHooksByName
GetPKeyHookByName
GetPKeyHooksByName
InsertHook
UpdateHook

DeleteHook

Deletes a(n) Hook.

Syntax
DeleteHook($HookID);
DeleteHook($hHook); # if $hHook includes HookID
Input
$HookID (integer)
identifier, dont use this internal key for registration (primary key)

ExistsHook

Returns true if the Hook exists.

Syntax
$exists = ExistsHook($HookID);
Input
$HookID (integer)
identifier, dont use this internal key for registration
Return
$exists (boolean)
1/0 the Hook exists (yes/no)

ExistsHookByName

Returns true if a Hook by alternate key Name exists.

Syntax
$HookID = ExistsHookByName($Name);
Input
$Name (varchar(255))
registration name
Return
$exists (boolean)
1/0 the u_hook_name exists (yes/no)

GetAllInfoHooks

Returns all objects of Hook.

Syntax
$ahHookIDs = GetAllInfoHooks();
Return
$ahHookIDs (reference to array of hashes)
with following keys:
  • HookID - identifier, dont use this internal key for registration (primary key)- integer
  • Name - registration name - varchar(255)

GetAllPKeyHooks

Returns all Hook identifiers.

Syntax
$aHookIDs = GetAllPKeyHooks();
Return
$aHookIDs (reference to array of integer)
identifier, dont use this internal key for registration

GetInfoHook

Returns the Hook by identifier.

Syntax
$hHook = GetInfoHook($HookID);
Input
$HookID (integer)
identifier, dont use this internal key for registration (primary key)
Return
$hHook (reference to hash)
with following keys:
  • HookID - identifier, dont use this internal key for registration (primary key)- integer
  • Name - registration name - varchar(255)

GetInfoHookByName

Returns the object of Hook by alternate key Name.

Syntax
$hHook = GetInfoHookByName($Name);
Input
$Name (varchar(255))
registration name
Return
$hHook (reference to hash)
with following keys:
  • HookID - identifier, dont use this internal key for registration (primary key)- integer
  • Name - registration name - varchar(255)

GetInfoHooksByName

Returns objects of Hook by alternate key Name.

Syntax
$ahHooks = GetInfoHooksByName($Name);
Input
$Name (varchar(255))
registration name
Return
$ahHooks (reference to array of hashes)
with following keys:
  • HookID - identifier, dont use this internal key for registration (primary key)- integer
  • Name - registration name - varchar(255)

GetPKeyHookByName

Returns primary key of Hook by alternate key Name.

Syntax
$HookID = GetPKeyHookByName($Name);
Input
$Name (varchar(255))
registration name
Return
$HookID (integer)
identifier, dont use this internal key for registration (primary key)

GetPKeyHooksByName

Returns primary keys of Hook by alternate key Name.

Syntax
$aKeys = GetPKeyHooksByName($Name);
Input
$Name (varchar(255))
registration name
Return
$aKeys (reference to array of integer)
identifier, dont use this internal key for registration (primary key)

InsertHook

Creates an entry of Hook.

Syntax
$HookID = InsertHook($hHook);
Input
$hHook (reference to hash)
with following keys:
  • HookID - identifier, dont use this internal key for registration (primary key)(optional)- integer
  • Name - registration name - varchar(255)
Return
$HookID (integer)
identifier, dont use this internal key for registration (primary key)

UpdateHook

Updates a(n) Hook if any element was changed.

Syntax
UpdateHook($HookID, $hHook);
UpdateHook($hHook); # if $hHook includes HookID
Input
$HookID (integer)
identifier, dont use this internal key for registration (primary key)
$hHook (reference to hash)
with following keys:
  • Name - registration name - varchar(255)
Return
1 (integer)
1