Update actions_mymodule.class.php

This commit is contained in:
Frédéric FRANCE 2018-04-08 14:05:44 +02:00 committed by GitHub
parent f388e235fd
commit b20fc6c816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,14 +65,14 @@ class ActionsMyModule
/**
* Execute action
* Execute action
*
* @param array $parameters Array of parameters
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action 'add', 'update', 'view'
* @return int <0 if KO,
* =0 if OK but we want to process standard actions too,
* >0 if OK and we want to replace standard actions.
* @param array $parameters Array of parameters
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action 'add', 'update', 'view'
* @return int <0 if KO,
* =0 if OK but we want to process standard actions too,
* >0 if OK and we want to replace standard actions.
*/
function getNomUrl($parameters,&$object,&$action)
{
@ -84,7 +84,7 @@ class ActionsMyModule
/**
* Overloading the doActions function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
@ -106,7 +106,7 @@ class ActionsMyModule
if (! $error) {
$this->results = array('myreturn' => 999);
$this->resprints = 'A text to show';
return 0; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = 'Error message';
return -1;
@ -117,7 +117,7 @@ class ActionsMyModule
/**
* Overloading the doActions function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
@ -142,7 +142,7 @@ class ActionsMyModule
if (! $error) {
$this->results = array('myreturn' => 999);
$this->resprints = 'A text to show';
return 0; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = 'Error message';
return -1;
@ -153,7 +153,7 @@ class ActionsMyModule
/**
* Overloading the addMoreMassActions function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
@ -172,7 +172,7 @@ class ActionsMyModule
}
if (! $error) {
return 0; // or return 1 to replace standard code
return 0; // or return 1 to replace standard code
} else {
$this->errors[] = 'Error message';
return -1;