31require_once DOL_DOCUMENT_ROOT .
'/core/class/commonobject.class.php';
32require_once DOL_DOCUMENT_ROOT .
'/hrm/class/evaluationdet.class.php';
43 public $module =
'hrm';
48 public $element =
'evaluation';
53 public $table_element =
'hrm_evaluation';
58 public $picto =
'label';
61 const STATUS_DRAFT = 0;
62 const STATUS_VALIDATED = 1;
63 const STATUS_CANCELED = 9;
64 const STATUS_CLOSED = 6;
97 public $fields = array(
98 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'visible' => 0,
'noteditable' => 1,
'index' => 1,
'css' =>
'left',
'comment' =>
"Id"),
99 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 20,
'notnull' => 1,
'visible' => 4,
'noteditable' => 1,
'default' =>
'(PROV)',
'index' => 1,
'searchall' => 1,
'showoncombobox' => 1,
'comment' =>
"Reference of object"),
100 'label' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'enabled' => 1,
'position' => 30,
'notnull' => 0,
'visible' => 1,
'searchall' => 1,
'css' =>
'minwidth300',
'cssview' =>
'wordbreak',
'showoncombobox' =>
'2',),
101 'description' => array(
'type' =>
'text',
'label' =>
'Description',
'enabled' => 1,
'position' => 60,
'notnull' => 0,
'visible' => 3,),
102 'note_public' => array(
'type' =>
'html',
'label' =>
'NotePublic',
'enabled' => 1,
'position' => 61,
'notnull' => 0,
'visible' => 0,),
103 'note_private' => array(
'type' =>
'html',
'label' =>
'NotePrivate',
'enabled' => 1,
'position' => 62,
'notnull' => 0,
'visible' => 0,),
104 'date_creation' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'position' => 500,
'notnull' => 1,
'visible' => -2,),
105 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'position' => 501,
'notnull' => 0,
'visible' => -2,),
106 'fk_user_creat' => array(
'type' =>
'integer:User:user/class/user.class.php:0',
'label' =>
'UserAuthor',
'enabled' => 1,
'position' => 510,
'notnull' => 1,
'visible' => -2,
'foreignkey' =>
'user.rowid',),
107 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php:0',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 511,
'notnull' => -1,
'visible' => -2,),
108 'import_key' => array(
'type' =>
'varchar(14)',
'label' =>
'ImportId',
'enabled' => 1,
'position' => 1000,
'notnull' => -1,
'visible' => -2,),
109 'status' => array(
'type' =>
'smallint',
'label' =>
'Status',
'enabled' => 1,
'position' => 1000,
'notnull' => 1,
'default' =>
'0',
'visible' => 5,
'index' => 1,
'arrayofkeyval' => array(
'0' =>
'Draft',
'1' =>
'Validated',
'6' =>
'Closed'),),
110 'date_eval' => array(
'type' =>
'date',
'label' =>
'DateEval',
'enabled' => 1,
'position' => 502,
'notnull' => 1,
'visible' => 1,),
111 'fk_user' => array(
'type' =>
'integer:User:user/class/user.class.php:0',
'label' =>
'Employee',
'enabled' => 1,
'position' => 504,
'notnull' => 1,
'visible' => 1,
'picto' =>
'user',
'css' =>
'maxwidth300 widthcentpercentminusxx',
'csslist' =>
'tdoverflowmax150'),
112 'fk_job' => array(
'type' =>
'integer:Job:/hrm/class/job.class.php',
'label' =>
'JobProfile',
'enabled' => 1,
'position' => 505,
'notnull' => 1,
'visible' => 1,
'picto' =>
'jobprofile',
'css' =>
'maxwidth300 widthcentpercentminusxx',
'csslist' =>
'tdoverflowmax150'),
119 public $note_private;
120 public $fk_user_creat;
121 public $fk_user_modif;
135 public $table_element_line =
'hrm_evaluationdet';
140 public $fk_element =
'fk_evaluation';
145 public $class_element_line =
'EvaluationLine';
157 protected $childtablesoncascade = array(
'@EvaluationLine:hrm/class/evaluationdet.class.php:fk_evaluation');
162 public $lines = array();
173 global $conf, $langs, $user;
177 $this->ismultientitymanaged = 0;
178 $this->isextrafieldmanaged = 1;
181 $this->fields[
'rowid'][
'visible'] = 0;
183 if (!isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
184 $this->fields[
'entity'][
'enabled'] = 0;
187 if (!$user->hasRight(
'hrm',
'evaluation',
'readall')) {
188 $this->fields[
'fk_user'][
'type'] .=
':rowid IN('.$this->db->sanitize(implode(
", ", $user->getAllChildIds(1))).
')';
194 foreach ($this->fields as $key => $val) {
195 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
196 unset($this->fields[$key]);
201 if (is_object($langs)) {
202 foreach ($this->fields as $key => $val) {
203 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
204 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
205 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
223 if ($resultcreate > 0) {
224 require_once DOL_DOCUMENT_ROOT .
'/hrm/class/skillrank.class.php';
226 $TRequiredRanks = $skillRank->fetchAll(
'ASC',
't.rowid', 0, 0,
'(fk_object:=:'.((
int) $this->fk_job).
") AND (objecttype:=:'job')");
228 if (is_array($TRequiredRanks) && !empty($TRequiredRanks)) {
229 $this->lines = array();
230 foreach ($TRequiredRanks as $required) {
232 $line->fk_evaluation = $resultcreate;
233 $line->fk_skill = $required->fk_skill;
234 $line->required_rank = $required->rankorder;
237 $res = $line->create($user, $notrigger);
239 $this->lines[] = $line;
245 return $resultcreate;
257 global $langs, $extrafields;
267 $result =
$object->fetchCommon($fromid);
268 if ($result > 0 && !empty(
$object->table_element_line)) {
282 if (property_exists(
$object,
'ref')) {
283 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
285 if (property_exists(
$object,
'label')) {
286 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".
$object->label : $this->fields[
'label'][
'default'];
288 if (property_exists(
$object,
'status')) {
289 $object->status = self::STATUS_DRAFT;
291 if (property_exists(
$object,
'date_creation')) {
294 if (property_exists(
$object,
'date_modification')) {
295 $object->date_modification =
null;
299 if (is_array(
$object->array_options) && count(
$object->array_options) > 0) {
300 $extrafields->fetch_name_optionals_label($this->table_element);
301 foreach (
$object->array_options as $key => $option) {
302 $shortkey = preg_replace(
'/options_/',
'', $key);
303 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
305 unset(
$object->array_options[$key]);
311 $object->context[
'createfromclone'] =
'createfromclone';
312 $result =
$object->createCommon($user);
327 if (property_exists($this,
'fk_soc') && $this->fk_soc ==
$object->socid) {
334 unset(
$object->context[
'createfromclone']);
341 $this->db->rollback();
353 public function fetch($id, $ref =
null)
356 if ($result > 0 && !empty($this->table_element_line)) {
369 $this->lines = array();
388 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $filtermode =
'AND')
396 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
397 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
398 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
400 $sql .=
' WHERE 1 = 1';
407 $this->errors[] = $errormessage;
408 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
412 if (!empty($sortfield)) {
413 $sql .= $this->db->order($sortfield, $sortorder);
415 if (!empty($limit)) {
416 $sql .=
' '.$this->db->plimit($limit, $offset);
419 $resql = $this->db->query($sql);
421 $num = $this->db->num_rows($resql);
423 while ($i < ($limit ? min($limit, $num) : $num)) {
424 $obj = $this->db->fetch_object($resql);
426 $record =
new self($this->db);
427 $record->setVarsFromFetchObj($obj);
429 $records[$record->id] = $record;
433 $this->db->free($resql);
437 $this->errors[] =
'Error '.$this->db->lasterror();
438 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
463 public function delete(
User $user, $notrigger = 0)
480 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
497 global $conf, $langs;
499 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
504 if ($this->
status == self::STATUS_VALIDATED) {
505 dol_syslog(get_class($this).
"::validate action abandoned: already validated", LOG_WARNING);
516 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
521 $this->newref = $num;
525 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
526 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
527 $sql .=
" status = ".self::STATUS_VALIDATED;
528 if (!empty($this->fields[
'date_validation'])) {
529 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
531 if (!empty($this->fields[
'fk_user_valid'])) {
532 $sql .=
", fk_user_valid = ".((int) $user->id);
534 $sql .=
" WHERE rowid = ".((int) $this->
id);
536 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
537 $resql = $this->db->query($sql);
540 $this->error = $this->db->lasterror();
544 if (!$error && !$notrigger) {
546 $result = $this->
call_trigger(
'HRM_EVALUATION_VALIDATE', $user);
555 $this->oldref = $this->ref;
558 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
560 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'evaluation/".$this->db->escape($this->newref).
"'";
561 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'evaluation/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
562 $resql = $this->db->query($sql);
565 $this->error = $this->db->lasterror();
567 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filepath = 'evaluation/".$this->db->escape($this->newref).
"'";
568 $sql .=
" WHERE filepath = 'evaluation/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
569 $resql = $this->db->query($sql);
572 $this->error = $this->db->lasterror();
578 $dirsource = $conf->hrm->dir_output.
'/evaluation/'.$oldref;
579 $dirdest = $conf->hrm->dir_output.
'/evaluation/'.$newref;
580 if (!$error && file_exists($dirsource)) {
581 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
583 if (@rename($dirsource, $dirdest)) {
586 $listoffiles =
dol_dir_list($conf->hrm->dir_output.
'/evaluation/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
587 foreach ($listoffiles as $fileentry) {
588 $dirsource = $fileentry[
'name'];
589 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
590 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
591 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
592 @rename($dirsource, $dirdest);
602 $this->
status = self::STATUS_VALIDATED;
609 $this->db->rollback();
622 $sql =
"SELECT rowid FROM ".MAIN_DB_PREFIX.
"hrm_evaluation ";
623 $sql .=
"WHERE fk_user=".((int) $fk_user).
" ";
624 $sql .=
"ORDER BY date_eval DESC ";
627 $res = $this->db->query($sql);
632 $Tab = $this->db->fetch_object($res);
638 $evaluation->fetch($Tab->rowid);
655 if ($this->
status <= self::STATUS_DRAFT) {
659 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'HRM_EVALUATION_UNVALIDATE');
669 public function cancel($user, $notrigger = 0)
672 if ($this->
status != self::STATUS_VALIDATED) {
676 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'HRM_EVALUATION_CANCEL');
686 public function reopen($user, $notrigger = 0)
689 if ($this->
status != self::STATUS_CANCELED) {
693 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'HRM_EVALUATION_REOPEN');
706 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
708 global $conf, $langs, $hookmanager;
710 if (!empty($conf->dol_no_mouse_hover)) {
716 $label =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"Evaluation").
'</u>';
717 if (isset($this->
status)) {
718 $label .=
' '.$this->getLibStatut(5);
721 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
723 $url =
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.$this->id;
725 if ($option !=
'nolink') {
727 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
728 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
729 $add_save_lastsearch_values = 1;
731 if ($add_save_lastsearch_values) {
732 $url .=
'&save_lastsearch_values=1';
737 if (empty($notooltip)) {
739 $label = $langs->trans(
"ShowEvaluation");
740 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
742 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
743 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
745 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
748 if ($option ==
'nolink') {
749 $linkstart =
'<span';
751 $linkstart =
'<a href="'.$url.
'"';
753 $linkstart .= $linkclose.
'>';
754 if ($option ==
'nolink') {
755 $linkend =
'</span>';
760 $result .= $linkstart;
762 if (empty($this->showphoto_on_popup)) {
764 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
768 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
770 list($class, $module) = explode(
'@', $this->picto);
773 $filename = $filearray[0][
'name'];
774 if (!empty($filename)) {
775 $pospoint = strpos($filearray[0][
'name'],
'.');
777 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
779 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
781 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
786 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
791 if ($withpicto != 2) {
792 $result .= $this->ref;
798 global $action, $hookmanager;
799 $hookmanager->initHooks(array(
'evaluationdao'));
800 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
801 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
803 $result = $hookmanager->resPrint;
805 $result .= $hookmanager->resPrint;
833 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
836 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
837 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
838 $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv(
'Closed');
839 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
840 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
841 $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv(
'Closed');
844 $statusType =
'status'.$status;
846 if ($status == self::STATUS_CANCELED) {
847 $statusType =
'status6';
850 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
861 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
862 $sql .=
' fk_user_creat, fk_user_modif';
863 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
864 $sql .=
' WHERE t.rowid = '.((int) $id);
865 $result = $this->db->query($sql);
867 if ($this->db->num_rows($result)) {
868 $obj = $this->db->fetch_object($result);
870 $this->
id = $obj->rowid;
872 $this->user_creation_id = $obj->fk_user_creat;
873 $this->user_modification_id = $obj->fk_user_modif;
874 $this->date_creation = $this->db->jdate($obj->datec);
875 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
878 $this->db->free($result);
906 $this->lines = array();
909 $result = $objectline->fetchAll(
'ASC',
'', 0, 0,
'(fk_evaluation:=:'.((
int) $this->
id).
')');
911 if (is_numeric($result)) {
915 $this->lines = $result;
927 global $langs, $conf;
931 $conf->global->HRMTEST_EVALUATION_ADDON =
'mod_evaluation_standard';
941 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
942 foreach ($dirmodels as $reldir) {
946 $mybool = ((bool) @include_once $dir.$file) || $mybool;
949 if ($mybool ===
false) {
954 if (class_exists($classname)) {
955 $obj =
new $classname();
956 $numref = $obj->getNextValue($this);
958 if ($numref !=
'' && $numref !=
'-1') {
961 $this->error = $obj->error;
966 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
970 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
986 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
988 global $conf, $langs;
995 $modele =
'standard';
997 if (!empty($this->model_pdf)) {
998 $modele = $this->model_pdf;
1004 $modelpath =
"core/modules/hrm/doc/";
1006 if (!empty($modele)) {
1007 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1022 global $selected, $langs;
1024 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1026 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1027 $return .=
'<div class="info-box info-box-sm">';
1028 $return .=
'<span class="info-box-icon bg-infobox-action">';
1030 $return .=
'</span>';
1031 $return .=
'<div class="info-box-content">';
1032 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl(1) : $this->ref).
'</span>';
1033 $return .=
'<input class="fright" id="cb'.$this->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1034 if (!empty($arraydata[
'user'])) {
1035 $return .=
'<br><span class="info-box-label ">'.$arraydata[
'user'].
'</span>';
1037 if (!empty($arraydata[
'job'])) {
1038 $return .=
'<br><span class="info-box-label ">'.$arraydata[
'job'].
'</span>';
1040 if (method_exists($this,
'getLibStatut')) {
1041 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
1043 $return .=
'</div>';
1044 $return .=
'</div>';
1045 $return .=
'</div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Or an array listing all the potential status of the object: array: int of the status => translated la...
Parent class of all other business classes (invoices, contracts, proposals, orders,...
deleteLineCommon(User $user, $idline, $notrigger=0)
Delete a line of object in database.
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
setErrorsFromObject($object)
setErrorsFromObject
createCommon(User $user, $notrigger=0)
Create object in the database.
getFieldList($alias='', $excludefields=array())
Function to concat keys of fields.
updateCommon(User $user, $notrigger=0)
Update object into database.
setStatusCommon($user, $status, $notrigger=0, $triggercode='')
Set to a status.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
copy_linked_contact($objFrom, $source='internal')
Copy contact from one element to current.
fetchLinesCommon($morewhere='', $noextrafields=0)
Load object in memory from the database.
fetchCommon($id, $ref=null, $morewhere='', $noextrafields=0)
Load object in memory from the database.
deleteCommon(User $user, $notrigger=0, $forcechilddeletion=0)
Delete object in database.
call_trigger($triggerName, $user)
Call trigger based on this instance.
Class to manage Dolibarr database access.
getLinesArray()
Create an array of lines.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionally the picto)
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
fetchLines()
Load object lines in memory from the database.
cancel($user, $notrigger=0)
Set cancel status.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter='', $filtermode='AND')
Load list of objects in memory from the database.
createFromClone(User $user, $fromid)
Clone an object into another one.
fetch($id, $ref=null)
Load object in memory from the database.
LibStatut($status, $mode=0)
Return the status.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
validate($user, $notrigger=0)
Validate object.
__construct(DoliDB $db)
Constructor.
reopen($user, $notrigger=0)
Set back to validated status.
info($id)
Load the info information in the object.
getLastEvaluationForUser($fk_user)
Get the last evaluation by date for the user assigned.
create(User $user, $notrigger=0)
Create object into database.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
getLibStatut($mode=0)
Return the label of the status.
deleteLine(User $user, $idline, $notrigger=0)
Delete a line of object in database.
setDraft($user, $notrigger=0)
Set draft status.
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
update(User $user, $notrigger=0)
Update object into database.
Class for EvaluationLine.
Class to manage Dolibarr users.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
forgeSQLFromUniversalSearchCriteria($filter, &$errorstr='', $noand=0, $nopar=0, $noerror=0)
forgeSQLFromUniversalSearchCriteria
dol_now($mode='auto')
Return date for now.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.