function post_addItem() { global $CFG_GLPI; // Manage add from template if (isset($this->input["_oldID"])) { // ADD choices PluginResourcesChoice::cloneItem($this->input["_oldID"], $this->fields['id']); // ADD items PluginResourcesResource_Item::cloneItem($this->input["_oldID"], $this->fields['id']); // ADD reports PluginResourcesReportConfig::cloneItem($this->input["_oldID"], $this->fields['id']); //manage template from helpdesk (no employee to add : resource.form.php) if (!isset($this->input["add_from_helpdesk"])) { PluginResourcesEmployee::cloneItem($this->input["_oldID"], $this->fields['id']); } // ADD Documents Document_Item::cloneItem($this->getType(), $this->input["_oldID"], $this->fields['id']); // ADD tasks PluginResourcesTask::cloneItem($this->input["_oldID"], $this->fields['id']); } //Launch notification if (isset($this->input['withtemplate']) && $this->input["withtemplate"] != 1 && isset($this->input['send_notification']) && $this->input['send_notification'] == 1) { if ($CFG_GLPI["use_mailing"]) { NotificationEvent::raiseEvent("new", $this); } } //ADD Checklists from rules $PluginResourcesChecklistconfig = new PluginResourcesChecklistconfig(); $PluginResourcesChecklistconfig->addChecklistsFromRules($this, PluginResourcesChecklist::RESOURCES_CHECKLIST_IN); $PluginResourcesChecklistconfig->addChecklistsFromRules($this, PluginResourcesChecklist::RESOURCES_CHECKLIST_OUT); }