28require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
38 public $module =
'workstation';
43 public $element =
'workstation';
48 public $table_element =
'workstation_workstation';
53 public $picto =
'workstation';
59 public $TRIGGER_PREFIX =
'WORKSTATION';
61 const STATUS_DISABLED = 0;
62 const STATUS_ENABLED = 1;
95 public $fields = array(
96 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'visible' => 0,
'noteditable' => 1,
'index' => 1,
'css' =>
'left',
'comment' =>
"Id"),
97 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'enabled' => 1,
'visible' => 0,
'position' => 5,
'notnull' => 1,
'default' =>
'1',
'index' => 1),
98 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 10,
'notnull' => 1,
'visible' => 1,
'noteditable' => 0,
'default' =>
'',
'index' => 1,
'searchall' => 1,
'showoncombobox' => 1,
'comment' =>
"Reference of object",
'csslist' =>
'nowraponall'),
99 'label' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'enabled' => 1,
'position' => 30,
'notnull' => 1,
'visible' => 1,
'searchall' => 1,
'css' =>
'minwidth300',
'csslist' =>
'tdoverflowmax125',
'showoncombobox' => 2,),
100 'type' => array(
'type' =>
'varchar(8)',
'label' =>
'Type',
'enabled' => 1,
'position' => 32,
'default' =>
'1',
'notnull' => 1,
'visible' => 1,
'arrayofkeyval' => array(
'HUMAN' =>
'Human',
'MACHINE' =>
'Machine',
'BOTH' =>
'HumanMachine'),),
101 'note_public' => array(
'type' =>
'html',
'label' =>
'NotePublic',
'enabled' => 1,
'position' => 61,
'notnull' => 0,
'visible' => 0,),
102 'note_private' => array(
'type' =>
'html',
'label' =>
'NotePrivate',
'enabled' => 1,
'position' => 62,
'notnull' => 0,
'visible' => 0,),
103 'date_creation' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'position' => 500,
'notnull' => 1,
'visible' => -2,
'csslist' =>
'nowraponall'),
104 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'position' => 501,
'notnull' => 0,
'visible' => -2,
'csslist' =>
'nowraponall'),
105 'fk_user_creat' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'position' => 510,
'notnull' => 1,
'visible' => -2,
'foreignkey' =>
'user.rowid',),
106 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 511,
'notnull' => -1,
'visible' => -2,),
107 'import_key' => array(
'type' =>
'varchar(14)',
'label' =>
'ImportId',
'enabled' => 1,
'position' => 512,
'notnull' => -1,
'visible' => -2,),
108 'nb_operators_required' => array(
'type' =>
'integer',
'label' =>
'NbOperatorsRequired',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right maxwidth50imp',
'csslist' =>
'maxwidth50imp'),
109 'thm_operator_estimated' => array(
'type' =>
'price',
'help' =>
'THMOperatorEstimatedHelp',
'label' =>
'THMOperatorEstimated',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right maxwidth75imp',
'csslist' =>
'maxwidth75imp'),
110 'thm_machine_estimated' => array(
'type' =>
'price',
'help' =>
'THMMachineEstimatedHelp',
'label' =>
'THMMachineEstimated',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right maxwidth75imp',
'csslist' =>
'maxwidth75imp'),
111 'status' => array(
'type' =>
'smallint',
'label' =>
'Status',
'enabled' => 1,
'position' => 1000,
'default' =>
'1',
'notnull' => 1,
'visible' => 1,
'index' => 1,
'arrayofkeyval' => array(0 =>
'Disabled', 1 =>
'Enabled'),),
137 public $fk_user_creat;
142 public $fk_user_modif;
152 public $nb_operators_required;
157 public $thm_operator_estimated;
162 public $thm_machine_estimated;
167 protected $childtables = array(
168 'product' => array(
'name' =>
'Product',
'fk_element' =>
'fk_default_workstation'),
169 'bom_bomline' => array(
'name' =>
'BOM',
'fk_element' =>
'fk_default_workstation',
'enabled' =>
'isModEnabled("bom")'),
170 'mrp_production' => array(
'name' =>
'ManufacturingOrder',
'fk_element' =>
'fk_default_workstation',
'enabled' =>
'isModEnabled("mrp")'),
188 public $fk_element =
'fk_workstation';
193 protected $childtablesoncascade = array(
'workstation_workstation_usergroup',
'workstation_workstation_resource');
202 global
$conf, $langs;
204 require_once DOL_DOCUMENT_ROOT.
'/workstation/class/workstationusergroup.class.php';
205 require_once DOL_DOCUMENT_ROOT.
'/workstation/class/workstationresource.class.php';
209 $this->ismultientitymanaged = 1;
210 $this->isextrafieldmanaged = 1;
213 $this->fields[
'rowid'][
'visible'] = 0;
215 if (!
isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
216 $this->fields[
'entity'][
'enabled'] = 0;
220 foreach ($this->fields as $key => $val) {
221 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
222 unset($this->fields[$key]);
227 if (is_object($langs)) {
228 foreach ($this->fields as $key => $val) {
229 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
230 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
231 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
250 $groups =
GETPOST(
'groups',
'array:int');
251 if (empty($groups)) {
252 $groups = $this->usergroups;
254 $groups = is_array($groups) ? array_unique(array_map(
'intval', $groups)) : array();
257 $resources =
GETPOST(
'resources',
'array:int');
258 if (empty($resources)) {
259 $resources = $this->resources;
261 $resources = is_array($resources) ? array_unique(array_map(
'intval', $resources)) : array();
268 $this->db->rollback();
272 $this->usergroups = array();
273 foreach ($groups as $id_group) {
275 $ws_usergroup->fk_workstation = $id;
276 $ws_usergroup->fk_usergroup = $id_group;
277 if ($ws_usergroup->createCommon($user) <= 0) {
279 $this->error = $ws_usergroup->error;
280 $this->errors = array_merge($this->errors, $ws_usergroup->errors);
283 $this->usergroups[] = $id_group;
286 $this->resources = array();
288 foreach ($resources as $id_resource) {
290 $ws_resource->fk_workstation = $id;
291 $ws_resource->fk_resource = $id_resource;
292 if ($ws_resource->createCommon($user) <= 0) {
294 $this->error = $ws_resource->error;
295 $this->errors = array_merge($this->errors, $ws_resource->errors);
298 $this->resources[] = $id_resource;
303 $this->db->rollback();
321 global $langs, $extrafields;
331 $result =
$object->fetch($fromid);
332 if ($result > 0 && !empty(
$object->table_element_line)) {
346 $object->ref =
"Copy_Of_".$object->ref;
348 $object->status = self::STATUS_DISABLED;
350 $object->date_modification =
null;
353 if (is_array(
$object->array_options) && count(
$object->array_options) > 0) {
354 $extrafields->fetch_name_optionals_label($this->table_element);
355 foreach (
$object->array_options as $key => $option) {
356 $shortkey = preg_replace(
'/options_/',
'', $key);
357 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
360 unset(
$object->array_options[$key]);
366 $object->context[
'createfromclone'] =
'createfromclone';
367 $result =
$object->create($user);
380 unset(
$object->context[
'createfromclone']);
387 $this->db->rollback();
399 public function fetch($id, $ref =
null)
406 if ($result > 0 && !empty($this->table_element_line)) {
419 $this->lines = array();
438 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $filtermode =
'AND')
446 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
447 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
448 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
450 $sql .=
' WHERE 1 = 1';
457 $this->errors[] = $errormessage;
458 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
462 if (!empty($sortfield)) {
463 $sql .= $this->db->order($sortfield, $sortorder);
465 if (!empty($limit)) {
466 $sql .= $this->db->plimit($limit, $offset);
469 $resql = $this->db->query($sql);
471 $num = $this->db->num_rows($resql);
473 while ($i < ($limit ? min($limit, $num) : $num)) {
474 $obj = $this->db->fetch_object($resql);
476 $record =
new self($this->db);
477 $record->setVarsFromFetchObj($obj);
479 $records[$record->id] = $record;
483 $this->db->free($resql);
487 $this->errors[] =
'Error '.$this->db->lasterror();
488 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
507 if (is_array($this->usergroups)) {
508 $groups = array_unique(array_map(
'intval', $this->usergroups));
510 $this->usergroups = array();
512 foreach ($groups as $id_group) {
514 $ws_usergroup->fk_workstation = $this->id;
515 $ws_usergroup->fk_usergroup = (int) $id_group;
516 $ws_usergroup->createCommon($user);
517 $this->usergroups[] = $id_group;
522 if (is_array($this->resources)) {
523 $resources = array_unique(array_map(
'intval', $this->resources));
525 $this->resources = array();
527 foreach ($resources as $id_resource) {
529 $ws_resource->fk_workstation = $this->id;
530 $ws_resource->fk_resource = (int) $id_resource;
531 $ws_resource->createCommon($user);
532 $this->resources[] = $id_resource;
546 public function delete(
User $user, $notrigger = 0)
551 $langs->loadLangs(array(
'products',
'mrp'));
568 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
588 if (empty($status)) {
605 return $this->
setStatusCommon($user, self::STATUS_ENABLED, $notrigger,
'WORKSTATION_ENABLED');
618 return $this->
setStatusCommon($user, self::STATUS_DISABLED, $notrigger,
'WORKSTATION_DISABLED');
629 global
$conf, $langs;
634 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"Workstation").
'</u>';
635 $datas[
'ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
636 if (isset($this->
status)) {
637 $datas[
'status'] =
'<br><b>'.$langs->trans(
"Status").
":</b> ".$this->
getLibStatut(5);
653 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
655 global
$conf, $langs, $hookmanager;
657 if (!empty(
$conf->dol_no_mouse_hover)) {
665 'objecttype' => $this->element,
667 $classfortooltip =
'classfortooltip';
670 $classfortooltip =
'classforajaxtooltip';
671 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
677 $baseurl = DOL_URL_ROOT .
'/workstation/workstation_card.php';
678 $query = [
'id' => $this->id];
680 if ($option !=
'nolink') {
682 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
683 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
684 $add_save_lastsearch_values = 1;
686 if ($add_save_lastsearch_values) {
687 $query = array_merge($query, [
'save_lastsearch_values' => 1]);
693 if (empty($notooltip)) {
695 $label = $langs->trans(
"ShowWorkstation");
696 $linkclose .=
' alt="'.dolPrintHTMLForAttribute($label).
'"';
698 $linkclose .= ($label ?
' title="'.dolPrintHTMLForAttribute($label).
'"' :
' title="tocomplete"');
699 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
701 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
704 $linkstart =
'<a href="'.$url.
'"';
705 $linkstart .= $linkclose.
'>';
708 $result .= $linkstart;
710 if (empty($this->showphoto_on_popup)) {
712 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'mrp'), (($withpicto != 2) ?
'class="paddingright"' :
''), 0, 0, $notooltip ? 0 : 1);
716 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
718 list($class, $module) = explode(
'@', $this->picto);
721 $filename = $filearray[0][
'name'];
722 if (!empty($filename)) {
723 $pospoint = strpos($filearray[0][
'name'],
'.');
725 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
727 $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>';
729 $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>';
734 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'mrp'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
739 if ($withpicto != 2) {
740 $result .= $this->ref;
746 global $action, $hookmanager;
747 $hookmanager->initHooks(array(
'workstationdao'));
748 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
749 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
751 $result = $hookmanager->resPrint;
753 $result .= $hookmanager->resPrint;
768 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
770 $return =
'<div class="box-flex-item box-flex-grow-zero">';
771 $return .=
'<div class="info-box info-box-sm">';
772 $return .=
'<span class="info-box-icon bg-infobox-action">';
774 $return .=
'</span>';
775 $return .=
'<div class="info-box-content">';
776 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->
getNomUrl() .
'</span>';
777 if ($selected >= 0) {
778 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
780 if (!empty($this->label)) {
781 $return .=
' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.
'</div>';
783 if (isset($this->thirdparty) && is_object($this->thirdparty)) {
784 $return .=
'<br><div class="info-box-ref tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).
'</div>';
786 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
816 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
819 $this->labelStatus[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv(
'Disabled');
820 $this->labelStatus[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv(
'Enabled');
821 $this->labelStatusShort[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv(
'Disabled');
822 $this->labelStatusShort[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv(
'Enabled');
825 $statusType =
'status'.$status;
827 if ($status == self::STATUS_ENABLED) {
828 $statusType =
'status4';
831 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
842 $sql =
'SELECT t.rowid, t.date_creation as datec, GREATEST(t.tms, COALESCE(tef.tms, t.tms)) as datem,';
843 $sql .=
' t.fk_user_creat, t.fk_user_modif';
844 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
845 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.$this->table_element.
'_extrafields as tef ON tef.fk_object=t.rowid';
846 $sql .=
' WHERE t.rowid = '.((int) $id);
847 $result = $this->db->query($sql);
849 if ($this->db->num_rows($result)) {
850 $obj = $this->db->fetch_object($result);
852 $this->
id = $obj->rowid;
854 $this->user_creation_id = $obj->fk_user_creat;
855 $this->user_modification_id = $obj->fk_user_modif;
856 $this->date_creation = $this->db->jdate($obj->datec);
857 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
860 $this->db->free($result);
884 global $langs,
$conf;
885 $langs->load(
"workstation");
888 $conf->global->WORKSTATION_WORKSTATION_ADDON =
'mod_workstation_standard';
898 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
899 foreach ($dirmodels as $reldir) {
903 if (file_exists($dir.$file)) {
904 $mybool = ((bool) @include_once $dir.$file) || $mybool;
913 if (class_exists($classname)) {
914 $obj =
new $classname();
915 '@phan-var-force ModeleNumRefWorkstation $obj';
916 $numref = $obj->getNextValue($this);
918 if ($numref !=
'' && $numref !=
'-1') {
921 $this->error = $obj->error;
926 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
930 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
946 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
948 global
$conf, $langs;
952 $langs->load(
"workstation");
955 $modele =
'standard_workstation';
957 if ($this->model_pdf) {
958 $modele = $this->model_pdf;
964 $modelpath =
"core/modules/workstation/doc/";
966 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
if(! $sortfield) if(! $sortorder) $object
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.
Class to manage Dolibarr database access.
Class to manage Dolibarr users.
fetch($id, $ref=null)
Load object in memory from the database.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
createFromClone(User $user, $fromid)
Clone an object into another one.
fetchLines()
Load object lines in memory from the database.
setEnabled($user, $notrigger=0)
Set draft status.
getTooltipContentArray($params)
getTooltipContentArray
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionally the picto)
getKanbanView($option='', $arraydata=null)
Return a thumb for kanban views.
create(User $user, $notrigger=0)
Create object into database.
setDisabled($user, $notrigger=0)
Set draft status.
deleteLine(User $user, $idline, $notrigger=0)
Delete a line of object in database.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter='', $filtermode='AND')
Load list of objects in memory from the database.
update(User $user, $notrigger=0)
Update object into database.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
info($id)
Load the info information in the object.
getLibStatut($mode=0)
Return the label of the status.
__construct(DoliDB $db)
Constructor.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
LibStatut($status, $mode=0)
Return the status.
setStatus($status, $notrigger=0)
Set draft status.
Class to link resource with Workstations.
static getAllResourcesOfWorkstation($fk_workstation)
Function used to get an array with all resources linked to a workstation.
static deleteAllResourcesOfWorkstation($fk_workstation)
Function used to remove all resources linked to a workstation.
Class to link User groups and Workstations.
static deleteAllGroupsOfWorkstation($fk_workstation)
Function used to remove all usergroups linked to a workstation.
static getAllGroupsOfWorkstation($fk_workstation)
Function used to get an array with all usergroups linked to a workstation.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
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.
dol_now($mode='gmt')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
forgeSQLFromUniversalSearchCriteria($filter, &$errorstr='', $noand=0, $nopar=0, $noerror=0, $forbiddenfields=array())
forgeSQLFromUniversalSearchCriteria
dolGetStatus($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
Output the badge of a status.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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 a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.