dolibarr  20.0.0-beta
Public Member Functions | Static Public Member Functions | List of all members
MailingTargets Class Reference

Parent class of emailing target selectors modules. More...

Inheritance diagram for MailingTargets:
Inheritance graph
[legend]

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 getDesc ()
 Return description of email selector. More...
 
 getNbOfRecords ()
 Return number of records for email selector. More...
 
 getNbOfRecipients ($sql)
 Retourne nombre de destinataires. More...
 
 formFilter ()
 Affiche formulaire de filtre qui apparait dans page de selection des destinataires de mailings. More...
 
 update_nb ($mailing_id)
 Met a jour nombre de destinataires. More...
 
 addTargetsToDatabase ($mailing_id, $cibles)
 Add a list of targets into the database. More...
 
 clear_target ($mailing_id)
 Supprime tous les destinataires de la table des cibles. More...
 

Static Public Member Functions

static getEmailingSelectorsList ($forcedir=null)
 Return list of widget. More...
 

Detailed Description

Parent class of emailing target selectors modules.

Definition at line 32 of file modules_mailings.php.

Constructor & Destructor Documentation

◆ __construct()

MailingTargets::__construct (   $db)

Member Function Documentation

◆ addTargetsToDatabase()

MailingTargets::addTargetsToDatabase (   $mailing_id,
  $cibles 
)

Add a list of targets into the database.

Parameters
int$mailing_idId of emailing
array$ciblesArray with targets
Returns
int Return integer < 0 if error, nb added if OK

Definition at line 195 of file modules_mailings.php.

◆ clear_target()

MailingTargets::clear_target (   $mailing_id)

Supprime tous les destinataires de la table des cibles.

Parameters
int$mailing_idId of emailing
Returns
void

Definition at line 286 of file modules_mailings.php.

References dol_syslog(), and update_nb().

◆ formFilter()

MailingTargets::formFilter ( )

Affiche formulaire de filtre qui apparait dans page de selection des destinataires de mailings.

Returns
string Retourne zone select

Reimplemented in mailing_mailing_mymodule_selector1, mailing_xinputuser, mailing_xinputfile, mailing_thirdparties_services_expired, mailing_thirdparties, mailing_pomme, mailing_partnership, mailing_fraise, mailing_eventorganization, mailing_contacts1, and mailing_advthirdparties.

Definition at line 152 of file modules_mailings.php.

◆ getDesc()

MailingTargets::getDesc ( )

Return description of email selector.

Returns
string Return translation of module label. Try translation of $this->name then translation of 'MailingModuleDesc'.$this->name, or $this->desc if not found

Definition at line 93 of file modules_mailings.php.

◆ getEmailingSelectorsList()

static MailingTargets::getEmailingSelectorsList (   $forcedir = null)
static

Return list of widget.

Function used by admin page htdoc/admin/widget. List is sorted by widget filename so by priority to run.

Parameters
array$forcedirnull=All default directories. This parameter is used by modulebuilder module only.
Returns
array Array list of widget

Definition at line 307 of file modules_mailings.php.

◆ getNbOfRecipients()

MailingTargets::getNbOfRecipients (   $sql)

Retourne nombre de destinataires.

Parameters
string$sqlSql request to count
Returns
int|string Nb of recipient, or <0 if error, or '' if NA

Reimplemented in mailing_mailing_mymodule_selector1, mailing_xinputuser, mailing_xinputfile, mailing_thirdparties_services_expired, mailing_thirdparties, mailing_pomme, mailing_partnership, mailing_fraise, mailing_eventorganization, mailing_contacts1, and mailing_advthirdparties.

Definition at line 131 of file modules_mailings.php.

◆ getNbOfRecords()

MailingTargets::getNbOfRecords ( )

Return number of records for email selector.

Returns
integer Example

Definition at line 120 of file modules_mailings.php.

◆ update_nb()

MailingTargets::update_nb (   $mailing_id)

Met a jour nombre de destinataires.

Parameters
int$mailing_idId of emailing
Returns
int Return integer < 0 si erreur, nb destinataires si ok

Definition at line 164 of file modules_mailings.php.

Referenced by clear_target().


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