dolibarr 24.0.0-beta
webportalmember.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2023-2024 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2023-2024 Lionel Vessiller <lvessiller@easya.solutions>
4 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
5 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Put here all includes required by your class file
28require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
29
34{
38 public $module = 'webportal';
39
43 const ARRAY_STATUS_LABEL = array(
44 Adherent::STATUS_DRAFT => 'Draft',
45 Adherent::STATUS_VALIDATED => 'Validated',
46 Adherent::STATUS_RESILIATED => 'MemberStatusResiliatedShort',
47 Adherent::STATUS_EXCLUDED => 'MemberStatusExcludedShort',
48 );
49
53 const MORPHY_LIST = array(
54 'phy' => 'Physical',
55 'mor' => 'Moral',
56 );
57
61 const GENDER_LIST = array(
62 'man' => 'Genderman',
63 'woman' => 'Genderwoman',
64 'other' => 'Genderother',
65 );
66
70 protected $member_static = null;
71
110 // BEGIN MODULEBUILDER PROPERTIES
114 public $fields = array(
115 //'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'position' => 10,),
116 'ref' => array('type' => 'varchar(30)', 'label' => 'Ref', 'default' => '1', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 12, 'index' => 1, 'showonheader' => 1,),
117 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => '1', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1,),
118
119 'lastname' => array('type' => 'varchar(50)', 'label' => 'Lastname', 'enabled' => 1, 'visible' => 4, 'position' => 30, 'showonheader' => 1,),
120 'firstname' => array('type' => 'varchar(50)', 'label' => 'Firstname', 'enabled' => 1, 'visible' => 4, 'position' => 35, 'showonheader' => 1,),
121 'gender' => array('type' => 'varchar(10)', 'label' => 'Gender', 'enabled' => 1, 'visible' => 4, 'position' => 50, 'arrayofkeyval' => self::GENDER_LIST, 'showonheader' => 1,),
122 'company' => array('type' => 'varchar(128)', 'label' => 'Societe', 'enabled' => 1, 'visible' => 4, 'position' => 65, 'showonheader' => 1,),
123 'address' => array('type' => 'text', 'label' => 'Address', 'enabled' => 1, 'visible' => 4, 'position' => 75, 'showonheader' => 1,),
124 'zip' => array('type' => 'varchar(10)', 'label' => 'Zip', 'enabled' => 1, 'visible' => 4, 'position' => 80, 'showonheader' => 1,),
125 'town' => array('type' => 'varchar(50)', 'label' => 'Town', 'enabled' => 1, 'visible' => 4, 'position' => 85, 'showonheader' => 1,),
126 'state_id' => array('type' => 'integer', 'label' => 'State id', 'enabled' => '!getDolGlobalString("MEMBER_DISABLE_STATE")', 'visible' => -5, 'position' => 90, 'showonheader' => 1,),
127 'country_id' => array('type' => 'integer:Ccountry:core/class/ccountry.class.php', 'label' => 'Country', 'enabled' => 1, 'visible' => 4, 'position' => 95, 'showonheader' => 1, 'nameintable' => 'country'),
128 'phone' => array('type' => 'varchar(30)', 'label' => 'Phone', 'enabled' => 1, 'visible' => 4, 'position' => 115, 'showonheader' => 1,),
129 'phone_perso' => array('type' => 'varchar(30)', 'label' => 'PhonePerso', 'enabled' => 1, 'visible' => 4, 'position' => 120, 'showonheader' => 1,),
130 'phone_mobile' => array('type' => 'varchar(30)', 'label' => 'PhoneMobile', 'enabled' => 1, 'visible' => 4, 'position' => 125, 'showonheader' => 1,),
131 'email' => array('type' => 'varchar(255)', 'label' => 'Email', 'enabled' => 1, 'visible' => 4, 'position' => 200, 'showonheader' => 1, 'picto' => 'email'),
132 'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => 1, 'visible' => 4, 'position' => 210, 'showonheader' => 1,),
133
134 'login' => array('type' => 'varchar(50)', 'label' => 'Login', 'enabled' => 1, 'visible' => 4, 'position' => 240,),
135 'typeid' => array('type' => 'integer:AdherentType:adherents/class/adherent_type.class.php', 'label' => 'MemberType', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 255, 'nameintable' => 'fk_adherent_type'),
136 'morphy' => array('type' => 'varchar(3)', 'label' => 'MemberNature', 'enabled' => 1, 'visible' => 4, 'notnull' => 1, 'position' => 260, 'arrayofkeyval' => self::MORPHY_LIST,),
137 'civility_id' => array('type' => 'sellist:c_civility:label:rowid::active=1', 'label' => 'Civility', 'enabled' => 1, 'visible' => 4, 'position' => 270, 'nameintable' => 'civility',),
138 'birth' => array('type' => 'date', 'label' => 'DateOfBirth', 'enabled' => 1, 'visible' => 4, 'position' => 290,),
139 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php', 'label' => 'ThirdParty', 'enabled' => 1, 'visible' => 5, 'position' => 300, 'nameinclass' => 'socid',),
140
141 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,),
142
143 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1, 'nameinclass' => 'statut', 'nameintable' => 'statut'),
144 );
148 public $rowid;
149 //public $ref;
150 //public $lastname;
151 //public $firstname;
152 //public $gender;
153 //public $address;
154 //public $zip;
155 //public $town;
156 //public $state_id;
157 //public $country;
158 //public $phone;
159 //public $phone_perso;
160 //public $phone_mobile;
161 //public $socialnetworks;
162 //public $login;
166 public $fk_adherent_type;
167 //public $morphy;
168 //public $societe;
169 //public $civility_id;
170 //public $datefin;
171 //public $birth;
172 //public $fk_soc;
173 //public $status;
174 // END MODULEBUILDER PROPERTIES
175
181 protected function getMemberStatic()
182 {
183 if (!$this->member_static) {
184 $this->member_static = new Adherent($this->db);
185 }
186
187 return $this->member_static;
188 }
189
195 public function __construct(DoliDB $db)
196 {
197 global $langs;
198
199 $this->db = $db;
200
201 $this->isextrafieldmanaged = 0;
202
203 $this->getMemberStatic();
204
205 // Translate some data of arrayofkeyval
206 if (is_object($langs)) {
207 foreach ($this->fields as $key => $val) {
208 if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
209 foreach ($val['arrayofkeyval'] as $key2 => $val2) {
210 $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2);
211 }
212 }
213 }
214 }
215 }
216
223 public function getTooltipContentArray($params)
224 {
225 global $langs;
226
227 $datas = [];
228
229 if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
230 return ['optimize' => $langs->trans("WebPortalMember")];
231 }
232 $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalMember") . '</u>';
233 if (isset($this->status)) {
234 $datas['picto'] .= ' ' . $this->getLibStatut(5);
235 }
236 $datas['ref'] = '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
237
238 return $datas;
239 }
240
254 public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
255 {
256 global $langs, $hookmanager;
257
258 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) {
259 $withpictoimg = 0;
260 }
261
262 $option = 'nolink';
263
264 $result = '';
265 $linkstart = '';
266 $linkend = '';
267 $classfortooltip = 'classfortooltip';
268 $dataparams = '';
269 $params = [
270 'id' => $this->id,
271 'objecttype' => $this->element,
272 'option' => $option,
273 'nofetch' => 1,
274 ];
275 if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
276 $classfortooltip = 'classforajaxtooltip';
277 $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"';
278 $label = '';
279 } else {
280 $label = implode($this->getTooltipContentArray($params));
281 }
282
283 $url = '';
284 //$url = DOL_URL_ROOT.'/adherents/card.php?rowid='.((int) $this->id);
285 //if ($option == 'subscription') {
286 // $url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.((int) $this->id);
287 //}
288
289 //if ($option != 'nolink') {
290 // // Add param to save lastsearch_values or not
291 // $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
292 // if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) {
293 // $add_save_lastsearch_values = 1;
294 // }
295 // if ($add_save_lastsearch_values) {
296 // $url .= '&save_lastsearch_values=1';
297 // }
298 //}
299
300 $linkstart .= '<a href="' . $url . '"';
301 $linkclose = "";
302 if (empty($notooltip)) {
303 if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
304 $langs->load("users");
305 $label = $langs->trans("ShowUser");
306 $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
307 }
308 $linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"');
309 $linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"';
310 }
311
312 $linkstart .= $linkclose . '>';
313 $linkend = '</a>';
314
315 if ($option === 'nolink') {
316 $linkstart = '';
317 $linkend = '';
318 }
319
320 $result .= $linkstart;
321 if ($withpictoimg) {
322 $result .= '<div class="inline-block nopadding valignmiddle">';
323 }
324 if ($withpictoimg) {
325 $paddafterimage = '';
326 if (abs($withpictoimg) == 1 || abs($withpictoimg) == 4) {
327 $morecss .= ' paddingrightonly';
328 }
329 // Only picto
330 if ($withpictoimg > 0) {
331 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '">' . img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1) . '</span>';
332 } else {
333 // Picto must be a photo
334 $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '"' . ($paddafterimage ? ' ' . $paddafterimage : '') . '>';
335 $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . (($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1);
336 $picto .= '</span>';
337 }
338 $result .= $picto;
339 }
340 if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) {
341 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
342 $result .= '<span class="nopadding valignmiddle' . ((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled') .
343 ($morecss ? ' usertext' . $morecss : '') . '">';
344 }
345 if ($mode == 'login') {
346 $result .= dol_trunc($this->login, $maxlen);
347 } elseif ($mode == 'ref') {
348 $result .= $this->ref;
349 } else {
350 $result .= $this->getFullName($langs, 0, ($mode == 'firstname' ? 2 : ($mode == 'lastname' ? 4 : -1)), $maxlen);
351 }
352 if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
353 $result .= '</span>';
354 }
355 }
356 if ($withpictoimg) {
357 $result .= '</div>';
358 }
359 $result .= $linkend;
360
361 //if ($addlinktonotes) {
362 // if ($this->note_private) {
363 // $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($this->note_private, 1);
364 // $result .= ' <span class="note inline-block">';
365 // $result .= '<a href="'.DOL_URL_ROOT.'/adherents/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">';
366 // $result .= img_picto('', 'note');
367 // $result .= '</a>';
368 // $result .= '</span>';
369 // }
370 //}
371 global $action;
372 $hookmanager->initHooks(array($this->element . 'dao'));
373 $parameters = array('id' => $this->id, 'getnomurl' => &$result);
374 $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
375 if ($reshook > 0) {
376 $result = $hookmanager->resPrint;
377 } else {
378 $result .= $hookmanager->resPrint;
379 }
380 return $result;
381 }
382
389 public function getLibStatut($mode = 0)
390 {
391 return $this->LibStatut($this->status, $this->need_subscription, $this->datefin, $mode);
392 }
393
394 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
395
405 public function LibStatut($status, $need_subscription, $date_end_subscription, $mode = 0)
406 {
407 // phpcs:enable
408 return $this->getMemberStatic()->LibStatut($status, $need_subscription, $date_end_subscription, $mode);
409 }
410
417 public function getBannerAddressForWebPortal($htmlkey)
418 {
419 global $conf, $langs, $form, $extralanguages;
420
421 $countriesusingstate = array('AU', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also option MAIN_FORCE_STATE_INTO_ADDRESS
422
423 $contactid = 0;
424 $thirdpartyid = 0;
425 $elementforaltlanguage = $this->element;
426
427 $out = '';
428
429 $outdone = 0;
430 $coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT'));
431 if ($coords) {
432 $address = dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
433 if ($address) {
434 $out .= $address;
435 $outdone++;
436 }
437 $outdone++;
438
439 // List of extra languages
440 $arrayoflangcode = array();
441 if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE')) {
442 $arrayoflangcode[] = getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE');
443 }
444
445 if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
446 if (!is_object($extralanguages)) {
447 include_once DOL_DOCUMENT_ROOT . '/core/class/extralanguages.class.php';
448 $extralanguages = new ExtraLanguages($this->db);
449 }
450 $extralanguages->fetch_name_extralanguages($elementforaltlanguage);
451
452 if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) {
453 $out .= "<!-- alternatelanguage for '" . $elementforaltlanguage . "' set to fields '" . implode(',', $extralanguages->attributes[$elementforaltlanguage]) . "' -->\n";
455 if (!is_object($form)) {
456 $form = new Form($this->db);
457 }
458 $htmltext = '';
459 // If there is extra languages
460 foreach ($arrayoflangcode as $extralangcode) {
461 $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
462 // This also call dol_format_address()
463 $coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode);
464 $htmltext .= $s . dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
465 }
466 $out .= $form->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
467 }
468 }
469 }
470
471 // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress
472 if (!in_array($this->country_code, $countriesusingstate) && !getDolGlobalString('MAIN_FORCE_STATE_INTO_ADDRESS')
473 && !getDolGlobalString('SOCIETE_DISABLE_STATE') && $this->state) {
474 if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 && $this->region) {
475 $out .= ($outdone ? ' - ' : '') . $this->region . ' - ' . $this->state;
476 } else {
477 $out .= ($outdone ? ' - ' : '') . $this->state;
478 }
479 $outdone++;
480 }
481
482 if ($outdone) {
483 $out = '<div class="address inline-block">' . $out . '</div>';
484 }
485
486 if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
487 $out .= ($outdone ? '<br>' : '');
488 }
489 if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
490 $out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
491 $outdone++;
492 }
493 if (!empty($this->phone_pro)) {
494 $out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
495 $outdone++;
496 }
497 if (!empty($this->phone_mobile)) {
498 $out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
499 $outdone++;
500 }
501 if (!empty($this->phone_perso)) {
502 $out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePerso"));
503 $outdone++;
504 }
505 if (!empty($this->office_phone)) {
506 $out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'phone', $langs->trans("PhonePro"));
507 $outdone++;
508 }
509 if (!empty($this->user_mobile)) {
510 $out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'mobile', $langs->trans("PhoneMobile"));
511 $outdone++;
512 }
513 if (!empty($this->fax)) {
514 $out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
515 $outdone++;
516 }
517 if (!empty($this->office_fax)) {
518 $out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, '', '&nbsp;', 'fax', $langs->trans("Fax"));
519 $outdone++;
520 }
521
522 if ($out) {
523 $out .= '<div style="clear: both;"></div>';
524 }
525 $outdone = 0;
526 if (!empty($this->email)) {
527 $out .= dol_print_email($this->email, $this->id, $this->id, '', 0, 0, 1);
528 $outdone++;
529 }
530 if (!empty($this->url)) {
531 $out .= dol_print_url($this->url, '_blank', 0, 1);
532 $outdone++;
533 }
534
535 return $out;
536 }
537}
Class to manage members of a foundation.
const STATUS_EXCLUDED
Excluded.
const STATUS_DRAFT
Draft status.
const STATUS_RESILIATED
Resiliated (membership end and was not renew)
const STATUS_VALIDATED
Validated status.
getFullAddress($withcountry=0, $sep="\n", $withregion=0, $extralangcode='')
Return full address of contact.
fetchValuesForExtraLanguages()
Function to get alternative languages of a data into $this->array_languages This method is NOT called...
Class to manage Dolibarr database access.
Class to manage standard extra languages.
Class to manage generation of HTML components Only common components must be here.
static showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0, $forcecapture='', $noexternsourceoverwrite=0, $usesharelinkifavailable=0)
Return HTML code to output a photo.
Class for WebPortalMember.
const ARRAY_STATUS_LABEL
Status list (short label)
__construct(DoliDB $db)
Constructor.
getLibStatut($mode=0)
Retourne le libelle du statut d'un adherent (brouillon, valide, resilie, exclu)
getTooltipContentArray($params)
getTooltipContentArray
getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1, $notooltip=0, $addlinktonotes=0)
Return clickable name (with picto eventually)
LibStatut($status, $need_subscription, $date_end_subscription, $mode=0)
Renvoi le libelle d'un statut donne.
const MORPHY_LIST
MorPhy list : Moral or Physical.
const GENDER_LIST
Gender list.
getBannerAddressForWebPortal($htmlkey)
Return full address for banner.
getMemberStatic()
Get member for static method.
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...
Definition index.php:168
getFullName($langs, $option=0, $nameorder=-1, $maxlen=0)
Return full name (civility+' '+name+' '+lastname)
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as p label as s rowid as s nom as s email
Sender: Who sends the email ("Sender" has sent emails on behalf of "From").
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
picto_from_langcode($codelang, $moreatt='', $notitlealt=0)
Return img flag of country for a language code or country code.
dol_print_phone($phone, $countrycode='', $contactid=0, $socid=0, $addlink='', $separ="&nbsp;", $withpicto='', $titlealt='', $adddivfloat=0, $morecss='paddingright')
Format phone numbers according to country.
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)
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_print_url($url, $target='_blank', $max=32, $withpicto=0, $morecss='')
Show Url link.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_email($email, $contactid=0, $socid=0, $addlink=0, $max=0, $showinvalid=1, $withpicto=0, $morecss='paddingrightonly')
Show EMail link formatted for HTML output.
dol_print_address($address, $htmlid, $element, $id, $noprint=0, $charfornl='')
Format address string.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...