39 public $description =
'';
45 public $version = self::VERSION_DEVELOPMENT;
51 public $picto =
'technic';
71 public $errors = array();
76 const VERSION_DEVELOPMENT =
'development';
81 const VERSION_EXPERIMENTAL =
'experimental';
86 const VERSION_DOLIBARR =
'dolibarr';
97 if (empty($this->
name)) {
98 $this->
name = preg_replace(
'/^Interface/i',
'', get_class($this));
119 return $this->description;
130 $langs->load(
"admin");
132 if ($this->version == self::VERSION_DEVELOPMENT) {
133 return $langs->trans(
"VersionDevelopment");
134 } elseif ($this->version == self::VERSION_EXPERIMENTAL) {
135 return $langs->trans(
"VersionExperimental");
136 } elseif ($this->version == self::VERSION_DOLIBARR) {
138 } elseif ($this->version) {
139 return $this->version;
141 return $langs->trans(
"Unknown");
153 if (!empty($object->error)) {
154 $this->errors = array_merge($this->errors, array($object->error));
156 if (!empty($object->errors)) {
157 $this->errors = array_merge($this->errors, $object->errors);
Class to stock current configuration.
Class to manage Dolibarr database access.
Class that all the triggers must extend.
runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
Function called when a Dolibarrr business event is done.
getName()
Returns the name of the trigger file.
getDesc()
Returns the description of trigger file.
__construct(DoliDB $db)
Constructor.
setErrorsFromObject($object)
setErrorsFromObject
getVersion()
Returns the version of the trigger file.
Class to manage translations.
Class to manage Dolibarr users.
$conf db name
Only used if Module[ID]Name translation string is not found.