26require_once DOL_DOCUMENT_ROOT.
'/core/triggers/dolibarrtriggers.class.php';
43 $this->
name = preg_replace(
'/^Interface/i',
'', get_class($this));
44 $this->family =
"eventorganization";
45 $this->
description =
"Triggers of this module to manage event organization triggers action";
46 $this->version = self::VERSIONS[
'prod'];
47 $this->picto =
'action';
74 if (empty($conf->eventorganization) || empty($conf->eventorganization->enabled)) {
81 if ($action ==
'PROJECT_VALIDATE') {
84 if (is_array($taskToDo) && count($taskToDo) > 0) {
86 $langs->loadLangs(array(
"eventorganization"));
89 foreach ($taskToDo as $taskLabel) {
90 $task =
new Task($this->db);
91 $task->label = $taskLabel;
92 $task->fk_project =
$object->id;
96 require_once DOL_DOCUMENT_ROOT .
"/core/modules/project/task/" .
getDolGlobalString(
'PROJECT_TASK_ADDON') .
'.php';
97 $modTask =
new $classnamemodtask();
98 $defaultref = $modTask->getNextValue(
$object->thirdparty, $task);
100 if (is_numeric($defaultref) && $defaultref <= 0) {
103 $task->ref = $defaultref;
106 $task->date_start =
null;
107 $task->date_end =
null;
109 $result = $task->create($user);
111 $this->errors = array_merge($this->errors, $task->errors);
120 dol_syslog(
"InterfaceEventOrganization.class.php: ".implode(
',', $this->errors), LOG_ERR);
121 $this->db->rollback();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to stock current configuration.
Class that all triggers must inherit.
Class of triggered functions for agenda module.
__construct($db)
Constructor.
runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
Function called when a Dolibarr business event is done.
Class to manage translations.
Class to manage Dolibarr users.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
$conf db name
Only used if Module[ID]Name translation string is not found.