CommonPeople
trait CommonPeople (View source)
Support class for third parties, contacts, members, users or resources
Properties expected in the host class receiving this trait.
Properties
| ?string | $address | ||
| ?string | $zip | ||
| ?string | $town | ||
| int | $state_id | ||
| string | $state_code | ||
| ?string | $state | ||
| ?string | |||
| ?string | $url | ||
| int | $id | ||
| int | $contact_id | ||
| int | $fk_soc | ||
| string | $civility_code | ||
| DoliDB | $db | ||
| string | $element | ||
| string | $name | ||
| string | $name_alias | ||
| string | $nom | ||
| string | $company | ||
| string | $firstname | ||
| string | $lastname | ||
| string | $personal_email | ||
| array<string, string> | $socialnetworks | ||
| string | $fax | ||
| string | $office_fax | ||
| string | $office_phone | ||
| string | $phone | ||
| string | $phone_perso | ||
| string | $phone_pro | ||
| string | $phone_mobile | ||
| string | $user_mobile | ||
| string | $country_code | ||
| string | $region |
Methods
Return full name (civility+' '+name+' '+lastname)
Return civility label of object
Set to upper or ucwords/lower if needed
Return full address of contact
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.
Details
getFullName(Translate $langs, int<0, 1> $option = 0, $nameorder = -1, $maxlen = 0)
Return full name (civility+' '+name+' '+lastname)
getCivilityLabel()
Return civility label of object
@return string Translated name of civility
string
getBannerAddress($htmlkey, CommonObject $object)
Return full address for banner
@param string $htmlkey HTML id to make banner content unique
void
setUpperOrLowerCase()
Set to upper or ucwords/lower if needed
abstract
getFullAddress($withcountry = 0, string $sep = "\n", $withregion = 0, $extralangcode = '')
Return full address of contact
@param int<0,1> $withcountry 1=Add country into address string
abstract
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.
@return 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