dolibarr 21.0.0-beta
commonpeople.class.php File Reference

File of the superclass of object classes that support people. More...

Go to the source code of this file.

Functions

 getFullName ($langs, $option=0, $nameorder=-1, $maxlen=0)
 Return full name (civility+' '+name+' '+lastname)
 
 getCivilityLabel ()
 Return civility label of object.
 
 getBannerAddress ($htmlkey, $object)
 Return full address for banner.
 
 setUpperOrLowerCase ()
 Set to upper or ucwords/lower if needed.
 
 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 by method fetch of objects but must be called separately.
 

Detailed Description

File of the superclass of object classes that support people.

Definition in file commonpeople.class.php.

Function Documentation

◆ fetchValuesForExtraLanguages()

fetchValuesForExtraLanguages ( )
abstract

Function to get alternative languages of a data into $this->array_languages This method is NOT called by method fetch of objects but must be called separately.

Returns
int<-1,1> Return integer <0 if error, 0 if no values of alternative languages to find nor found, 1 if a value was found and loaded
See also
fetch_optionnals()

◆ getBannerAddress()

getBannerAddress ( $htmlkey,
$object )

Return full address for banner.

Parameters
string$htmlkeyHTML id to make banner content unique
CommonObject$objectObject (thirdparty, thirdparty of contact for contact, null for a member)
Returns
string Full address string

Definition at line 159 of file commonpeople.class.php.

References $conf, $id, $object, address, getDolGlobalInt(), getDolGlobalString(), getFullAddress(), and getFullName().

◆ getCivilityLabel()

getCivilityLabel ( )

Return civility label of object.

Returns
string Translated name of civility

Definition at line 137 of file commonpeople.class.php.

◆ getFullAddress()

getFullAddress ( $withcountry = 0,
$sep = "\n",
$withregion = 0,
$extralangcode = '' )
abstract

Return full address of contact.

Parameters
int<0,1>$withcountry 1=Add country into address string
string$sepSeparator to use to build string
int<0,1>$withregion 1=Add region into address string
string$extralangcodeUser extralanguages as value
Returns
string Full address string

Referenced by getBannerAddress().

◆ getFullName()

getFullName ( $langs,
$option = 0,
$nameorder = -1,
$maxlen = 0 )

Return full name (civility+' '+name+' '+lastname)

Parameters
Translate$langsLanguage object for translation of civility (used only if option is 1)
int$option0=No option, 1=Add civility
int$nameorder-1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname, 3=Firstname if defined else lastname, 4=Lastname, 5=Lastname if defined else firstname
int$maxlenMaximum length
Returns
string String with full name

Definition at line 107 of file commonpeople.class.php.

References dol_string_nohtmltag(), dol_trunc(), dolGetFirstLastname(), and name.

Referenced by Adherent\_load_ldap_info(), Contact\_load_ldap_info(), User\_load_ldap_info(), User\create(), getBannerAddress(), Adherent\getNomUrl(), Contact\getNomUrl(), User\getNomUrl(), WebPortalMember\getNomUrl(), Adherent\getTooltipContentArray(), Contact\getTooltipContentArray(), User\getTooltipContentArray(), Adherent\makeSubstitution(), and Adherent\subscriptionComplementaryActions().

◆ setUpperOrLowerCase()

setUpperOrLowerCase ( )