dolibarr  7.0.0-beta
Public Member Functions | List of all members
Address Class Reference

Class to manage addresses. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create ($socid, $user='')
 Create address into database. More...
 
 verify ()
 Verification lors de la modification de l'adresse. More...
 
 update ($id, $socid, $user='')
 Mise a jour des parametres de l'adresse. More...
 
 fetch_lines ($socid, $user=null)
 Charge depuis la base toutes les adresses d'une societe. More...
 
 fetch_address ($id, $user=null)
 Charge depuis la base l'objet adresse. More...
 
 delete ($id, $socid)
 Suppression d'une adresse. More...
 
 getNomUrl ($withpicto=0, $option='')
 Return name of address with link (and eventually picto) Use $this->id, $this->label, $this->socid. More...
 
 info ($id)
 Charge les informations d'ordre info dans l'objet societe. More...
 

Detailed Description

Class to manage addresses.

Deprecated:
This class is dedicated to a not supported and deprecated feature.

Definition at line 32 of file address.class.php.

Constructor & Destructor Documentation

Address::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler
Deprecated:

Definition at line 62 of file address.class.php.

Member Function Documentation

Address::create (   $socid,
  $user = '' 
)

Create address into database.

Parameters
int$socidCompany socid
User$userObject user making creation
Returns
int 0 if OK, < 0 if KO

Definition at line 74 of file address.class.php.

References dol_now(), dol_syslog(), name, update(), and verify().

Address::delete (   $id,
  $socid 
)

Suppression d'une adresse.

Parameters
int$idid de la societe a supprimer
int$socidid third party
Returns
<0 KO >0 OK

Definition at line 402 of file address.class.php.

References dol_syslog().

Address::fetch_address (   $id,
  $user = null 
)

Charge depuis la base l'objet adresse.

Parameters
int$idId de l'adresse a charger en memoire
User$userObjet de l'utilisateur
Returns
int >0 si ok, <0 si ko

Definition at line 334 of file address.class.php.

References $resql, dol_syslog(), and name.

Address::fetch_lines (   $socid,
  $user = null 
)

Charge depuis la base toutes les adresses d'une societe.

Parameters
int$socidId de la societe a charger en memoire
User$userObjet de l'utilisateur
Returns
int >0 si ok, <0 si ko

Definition at line 241 of file address.class.php.

References $resql, and dol_syslog().

Address::getNomUrl (   $withpicto = 0,
  $option = '' 
)

Return name of address with link (and eventually picto) Use $this->id, $this->label, $this->socid.

Parameters
int$withpictoInclude picto with link
string$optionWhere the link point to
Returns
string String with URL

Definition at line 427 of file address.class.php.

References dol_escape_htmltag().

Address::info (   $id)

Charge les informations d'ordre info dans l'objet societe.

Parameters
int$idid de la societe a charger
Returns
void

Definition at line 449 of file address.class.php.

References dol_print_error().

Address::update (   $id,
  $socid,
  $user = '' 
)

Mise a jour des parametres de l'adresse.

Parameters
int$idid address
int$socidid third party
User$userUtilisateur qui demande la mise a jour
Returns
int <0 if KO, >=0 if OK

Definition at line 165 of file address.class.php.

References $resql, dol_syslog(), name, and verify().

Referenced by create().

Address::verify ( )

Verification lors de la modification de l'adresse.

Returns
int 0 if OK, <0 if KO

Definition at line 143 of file address.class.php.

References name.

Referenced by create(), and update().


The documentation for this class was generated from the following file: