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 $date_creation;
121 public $fk_user_creat;
122 public $fk_user_modif;
136 public $table_element_line =
'hrm_evaluationdet';
141 public $fk_element =
'fk_evaluation';
146 public $class_element_line =
'EvaluationLine';
158 protected $childtablesoncascade = array(
'@EvaluationLine:hrm/class/evaluationdet.class.php:fk_evaluation');
163 public $lines = array();
174 global $conf, $langs, $user;
178 $this->ismultientitymanaged = 0;
179 $this->isextrafieldmanaged = 1;
182 $this->fields[
'rowid'][
'visible'] = 0;
184 if (!isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
185 $this->fields[
'entity'][
'enabled'] = 0;
188 if (!$user->hasRight(
'hrm',
'evaluation',
'readall')) {
189 $this->fields[
'fk_user'][
'type'] .=
':rowid IN('.$this->db->sanitize(implode(
", ", $user->getAllChildIds(1))).
')';
195 foreach ($this->fields as $key => $val) {
196 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
197 unset($this->fields[$key]);
202 if (is_object($langs)) {
203 foreach ($this->fields as $key => $val) {
204 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
205 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
206 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
224 if ($resultcreate > 0) {
225 require_once DOL_DOCUMENT_ROOT .
'/hrm/class/skillrank.class.php';
227 $TRequiredRanks = $skillRank->fetchAll(
'ASC',
't.rowid', 0, 0,
'(fk_object:=:'.((
int) $this->fk_job).
") AND (objecttype:=:'job')");
229 if (is_array($TRequiredRanks) && !empty($TRequiredRanks)) {
230 $this->lines = array();
231 foreach ($TRequiredRanks as $required) {
233 $line->fk_evaluation = $resultcreate;
234 $line->fk_skill = $required->fk_skill;
235 $line->required_rank = $required->rankorder;
238 $res = $line->create($user, $notrigger);
240 $this->lines[] = $line;
246 return $resultcreate;
258 global $langs, $extrafields;
268 $result =
$object->fetchCommon($fromid);
269 if ($result > 0 && !empty(
$object->table_element_line)) {
283 if (property_exists(
$object,
'ref')) {
284 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
286 if (property_exists(
$object,
'label')) {
287 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".
$object->label : $this->fields[
'label'][
'default'];
289 if (property_exists(
$object,
'status')) {
290 $object->status = self::STATUS_DRAFT;
292 if (property_exists(
$object,
'date_creation')) {
295 if (property_exists(
$object,
'date_modification')) {
296 $object->date_modification =
null;
300 if (is_array(
$object->array_options) && count(
$object->array_options) > 0) {
301 $extrafields->fetch_name_optionals_label($this->table_element);
302 foreach (
$object->array_options as $key => $option) {
303 $shortkey = preg_replace(
'/options_/',
'', $key);
304 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
306 unset(
$object->array_options[$key]);
312 $object->context[
'createfromclone'] =
'createfromclone';
313 $result =
$object->createCommon($user);
328 if (property_exists($this,
'fk_soc') && $this->fk_soc ==
$object->socid) {
335 unset(
$object->context[
'createfromclone']);
342 $this->db->rollback();
354 public function fetch($id, $ref =
null)
357 if ($result > 0 && !empty($this->table_element_line)) {
370 $this->lines = array();
389 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $filtermode =
'AND')
397 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
398 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
399 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
401 $sql .=
' WHERE 1 = 1';
408 $this->errors[] = $errormessage;
409 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
413 if (!empty($sortfield)) {
414 $sql .= $this->db->order($sortfield, $sortorder);
416 if (!empty($limit)) {
417 $sql .=
' '.$this->db->plimit($limit, $offset);
420 $resql = $this->db->query($sql);
422 $num = $this->db->num_rows($resql);
424 while ($i < ($limit ? min($limit, $num) : $num)) {
425 $obj = $this->db->fetch_object($resql);
427 $record =
new self($this->db);
428 $record->setVarsFromFetchObj($obj);
430 $records[$record->id] = $record;
434 $this->db->free($resql);
438 $this->errors[] =
'Error '.$this->db->lasterror();
439 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
464 public function delete(
User $user, $notrigger = 0)
481 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
498 global $conf, $langs;
500 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
505 if ($this->
status == self::STATUS_VALIDATED) {
506 dol_syslog(get_class($this).
"::validate action abandoned: already validated", LOG_WARNING);
517 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
522 $this->newref = $num;
526 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
527 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
528 $sql .=
" status = ".self::STATUS_VALIDATED;
529 if (!empty($this->fields[
'date_validation'])) {
530 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
532 if (!empty($this->fields[
'fk_user_valid'])) {
533 $sql .=
", fk_user_valid = ".((int) $user->id);
535 $sql .=
" WHERE rowid = ".((int) $this->
id);
537 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
538 $resql = $this->db->query($sql);
541 $this->error = $this->db->lasterror();
545 if (!$error && !$notrigger) {
547 $result = $this->
call_trigger(
'HRM_EVALUATION_VALIDATE', $user);
556 $this->oldref = $this->ref;
559 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
561 $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).
"'";
562 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'evaluation/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
563 $resql = $this->db->query($sql);
566 $this->error = $this->db->lasterror();
568 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filepath = 'evaluation/".$this->db->escape($this->newref).
"'";
569 $sql .=
" WHERE filepath = 'evaluation/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
570 $resql = $this->db->query($sql);
573 $this->error = $this->db->lasterror();
579 $dirsource = $conf->hrm->dir_output.
'/evaluation/'.$oldref;
580 $dirdest = $conf->hrm->dir_output.
'/evaluation/'.$newref;
581 if (!$error && file_exists($dirsource)) {
582 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
584 if (@rename($dirsource, $dirdest)) {
587 $listoffiles =
dol_dir_list($conf->hrm->dir_output.
'/evaluation/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
588 foreach ($listoffiles as $fileentry) {
589 $dirsource = $fileentry[
'name'];
590 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
591 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
592 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
593 @rename($dirsource, $dirdest);
603 $this->
status = self::STATUS_VALIDATED;
610 $this->db->rollback();
623 $sql =
"SELECT rowid FROM ".MAIN_DB_PREFIX.
"hrm_evaluation ";
624 $sql .=
"WHERE fk_user=".((int) $fk_user).
" ";
625 $sql .=
"ORDER BY date_eval DESC ";
628 $res = $this->db->query($sql);
633 $Tab = $this->db->fetch_object($res);
639 $evaluation->fetch($Tab->rowid);
656 if ($this->
status <= self::STATUS_DRAFT) {
660 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'HRM_EVALUATION_UNVALIDATE');
670 public function cancel($user, $notrigger = 0)
673 if ($this->
status != self::STATUS_VALIDATED) {
677 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'HRM_EVALUATION_CANCEL');
687 public function reopen($user, $notrigger = 0)
690 if ($this->
status != self::STATUS_CANCELED) {
694 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'HRM_EVALUATION_REOPEN');
707 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
709 global $conf, $langs, $hookmanager;
711 if (!empty($conf->dol_no_mouse_hover)) {
717 $label =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"Evaluation").
'</u>';
718 if (isset($this->
status)) {
719 $label .=
' '.$this->getLibStatut(5);
722 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
724 $url =
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.$this->id;
726 if ($option !=
'nolink') {
728 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
729 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
730 $add_save_lastsearch_values = 1;
732 if ($add_save_lastsearch_values) {
733 $url .=
'&save_lastsearch_values=1';
738 if (empty($notooltip)) {
740 $label = $langs->trans(
"ShowEvaluation");
741 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
743 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
744 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
746 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
749 if ($option ==
'nolink') {
750 $linkstart =
'<span';
752 $linkstart =
'<a href="'.$url.
'"';
754 $linkstart .= $linkclose.
'>';
755 if ($option ==
'nolink') {
756 $linkend =
'</span>';
761 $result .= $linkstart;
763 if (empty($this->showphoto_on_popup)) {
765 $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);
769 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
771 list($class, $module) = explode(
'@', $this->picto);
774 $filename = $filearray[0][
'name'];
775 if (!empty($filename)) {
776 $pospoint = strpos($filearray[0][
'name'],
'.');
778 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
780 $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>';
782 $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>';
787 $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);
792 if ($withpicto != 2) {
793 $result .= $this->ref;
799 global $action, $hookmanager;
800 $hookmanager->initHooks(array(
'evaluationdao'));
801 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
802 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
804 $result = $hookmanager->resPrint;
806 $result .= $hookmanager->resPrint;
834 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
837 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
838 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
839 $this->labelStatus[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv(
'Closed');
840 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'Draft');
841 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
842 $this->labelStatusShort[self::STATUS_CLOSED] = $langs->transnoentitiesnoconv(
'Closed');
845 $statusType =
'status'.$status;
847 if ($status == self::STATUS_CANCELED) {
848 $statusType =
'status6';
851 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
862 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
863 $sql .=
' fk_user_creat, fk_user_modif';
864 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
865 $sql .=
' WHERE t.rowid = '.((int) $id);
866 $result = $this->db->query($sql);
868 if ($this->db->num_rows($result)) {
869 $obj = $this->db->fetch_object($result);
871 $this->
id = $obj->rowid;
873 $this->user_creation_id = $obj->fk_user_creat;
874 $this->user_modification_id = $obj->fk_user_modif;
875 $this->date_creation = $this->db->jdate($obj->datec);
876 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
879 $this->db->free($result);
907 $this->lines = array();
910 $result = $objectline->fetchAll(
'ASC',
'', 0, 0,
'(fk_evaluation:=:'.((
int) $this->
id).
')');
912 if (is_numeric($result)) {
916 $this->lines = $result;
928 global $langs, $conf;
932 $conf->global->HRMTEST_EVALUATION_ADDON =
'mod_evaluation_standard';
942 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
943 foreach ($dirmodels as $reldir) {
947 $mybool = ((bool) @include_once $dir.$file) || $mybool;
950 if ($mybool ===
false) {
955 if (class_exists($classname)) {
956 $obj =
new $classname();
957 $numref = $obj->getNextValue($this);
959 if ($numref !=
'' && $numref !=
'-1') {
962 $this->error = $obj->error;
967 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
971 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
987 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
989 global $conf, $langs;
996 $modele =
'standard';
998 if (!empty($this->model_pdf)) {
999 $modele = $this->model_pdf;
1005 $modelpath =
"core/modules/hrm/doc/";
1007 if (!empty($modele)) {
1008 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1023 global $selected, $langs;
1025 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1027 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1028 $return .=
'<div class="info-box info-box-sm">';
1029 $return .=
'<span class="info-box-icon bg-infobox-action">';
1031 $return .=
'</span>';
1032 $return .=
'<div class="info-box-content">';
1033 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl(1) : $this->ref).
'</span>';
1034 $return .=
'<input class="fright" id="cb'.$this->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1035 if (!empty($arraydata[
'user'])) {
1036 $return .=
'<br><span class="info-box-label ">'.$arraydata[
'user'].
'</span>';
1038 if (!empty($arraydata[
'job'])) {
1039 $return .=
'<br><span class="info-box-label ">'.$arraydata[
'job'].
'</span>';
1041 if (method_exists($this,
'getLibStatut')) {
1042 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
1044 $return .=
'</div>';
1045 $return .=
'</div>';
1046 $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.