dolibarr 21.0.0-alpha
ActionsMyModule Class Reference

Class ActionsMyModule. More...

Inheritance diagram for ActionsMyModule:
Collaboration diagram for ActionsMyModule:

Public Member Functions

 __construct ($db)
 Constructor.
 
 getNomUrl ($parameters, &$object, &$action)
 Execute action.
 
 doActions ($parameters, &$object, &$action, $hookmanager)
 Overload the doActions function : replacing the parent's function with the one below.
 
 doMassActions ($parameters, &$object, &$action, $hookmanager)
 Overload the doMassActions function : replacing the parent's function with the one below.
 
 addMoreMassActions ($parameters, &$object, &$action, $hookmanager)
 Overload the addMoreMassActions function : replacing the parent's function with the one below.
 
 beforePDFCreation ($parameters, &$object, &$action)
 Execute action before PDF (document) creation.
 
 afterPDFCreation ($parameters, &$pdfhandler, &$action)
 Execute action after PDF (document) creation.
 
 loadDataForCustomReports ($parameters, &$action, $hookmanager)
 Overload the loadDataForCustomReports function : returns data to complete the customreport tool.
 
 restrictedArea ($parameters, &$action, $hookmanager)
 Overload the restrictedArea function : check permission on an object.
 
 completeTabsHead (&$parameters, &$object, &$action, $hookmanager)
 Execute action completeTabsHead.
 

Additional Inherited Members

- Protected Member Functions inherited from CommonHookActions
 isContext ($parameters, $allContexts)
 Check context of hook.
 

Detailed Description

Class ActionsMyModule.

Definition at line 32 of file actions_mymodule.class.php.

Constructor & Destructor Documentation

◆ __construct()

ActionsMyModule::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 71 of file actions_mymodule.class.php.

Member Function Documentation

◆ addMoreMassActions()

ActionsMyModule::addMoreMassActions ( $parameters,
& $object,
& $action,
$hookmanager )

Overload the addMoreMassActions function : replacing the parent's function with the one below.

Parameters
array<string,mixed>$parameters Hook metadata (context, etc...)
CommonObject$objectThe object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
?string$actionCurrent action (if set). Generally create or edit or null
HookManager$hookmanagerHook manager propagated to allow calling another hook
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 170 of file actions_mymodule.class.php.

◆ afterPDFCreation()

ActionsMyModule::afterPDFCreation ( $parameters,
& $pdfhandler,
& $action )

Execute action after PDF (document) creation.

Parameters
array<string,mixed>$parameters Array of parameters
CommonDocGenerator$pdfhandlerPDF builder handler
string$action'add', 'update', 'view'
Returns
int Return integer <0 if KO, =0 if OK but we want to process standard actions too, >0 if OK and we want to replace standard actions.

Definition at line 231 of file actions_mymodule.class.php.

References dol_syslog().

◆ beforePDFCreation()

ActionsMyModule::beforePDFCreation ( $parameters,
& $object,
& $action )

Execute action before PDF (document) creation.

Parameters
array<string,mixed>$parameters Array of parameters
CommonObject$objectObject output on PDF
string$action'add', 'update', 'view'
Returns
int Return integer <0 if KO, =0 if OK but we want to process standard actions too, >0 if OK and we want to replace standard actions.

Definition at line 202 of file actions_mymodule.class.php.

References dol_syslog().

◆ completeTabsHead()

ActionsMyModule::completeTabsHead ( & $parameters,
& $object,
& $action,
$hookmanager )

Execute action completeTabsHead.

Parameters
array<string,mixed>$parameters Array of parameters
CommonObject$objectThe object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
string$action'add', 'update', 'view'
Hookmanager$hookmanagerHookmanager
Returns
int Return integer <0 if KO, =0 if OK but we want to process standard actions too, >0 if OK and we want to replace standard actions.

Definition at line 336 of file actions_mymodule.class.php.

References $id, and dol_buildpath().

◆ doActions()

ActionsMyModule::doActions ( $parameters,
& $object,
& $action,
$hookmanager )

Overload the doActions function : replacing the parent's function with the one below.

Parameters
array<string,mixed>$parameters Hook metadata (context, etc...)
CommonObject$objectThe object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
?string$actionCurrent action (if set). Generally create or edit or null
HookManager$hookmanagerHook manager propagated to allow calling another hook
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 103 of file actions_mymodule.class.php.

◆ doMassActions()

ActionsMyModule::doMassActions ( $parameters,
& $object,
& $action,
$hookmanager )

Overload the doMassActions function : replacing the parent's function with the one below.

Parameters
array<string,mixed>$parameters Hook metadata (context, etc...)
CommonObject$objectThe object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
?string$actionCurrent action (if set). Generally create or edit or null
HookManager$hookmanagerHook manager propagated to allow calling another hook
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 136 of file actions_mymodule.class.php.

◆ getNomUrl()

ActionsMyModule::getNomUrl ( $parameters,
& $object,
& $action )

Execute action.

Parameters
array<string,mixed>$parameters Array of parameters
CommonObject$objectThe object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
string$action'add', 'update', 'view'
Returns
int Return integer <0 if KO, =0 if OK but we want to process standard actions too, >0 if OK and we want to replace standard actions.

Definition at line 87 of file actions_mymodule.class.php.

◆ loadDataForCustomReports()

ActionsMyModule::loadDataForCustomReports ( $parameters,
& $action,
$hookmanager )

Overload the loadDataForCustomReports function : returns data to complete the customreport tool.

Parameters
array<string,mixed>$parameters Hook metadata (context, etc...)
?string$actionCurrent action (if set). Generally create or edit or null
HookManager$hookmanagerHook manager propagated to allow calling another hook
Returns
int Return integer < 0 on error, 0 on success, 1 to replace standard code

Definition at line 261 of file actions_mymodule.class.php.

References dol_buildpath().

◆ restrictedArea()

ActionsMyModule::restrictedArea ( $parameters,
& $action,
$hookmanager )

Overload the restrictedArea function : check permission on an object.

Parameters
array<string,mixed>$parameters Hook metadata (context, etc...)
string$actionCurrent action (if set). Generally create or edit or null
HookManager$hookmanagerHook manager propagated to allow calling another hook
Returns
int Return integer <0 if KO, =0 if OK but we want to process standard actions too, >0 if OK and we want to replace standard actions.

Definition at line 308 of file actions_mymodule.class.php.


The documentation for this class was generated from the following file: