|
dolibarr 25.0.0-alpha
|
Parent class of emailing target selectors modules. More...

Public Member Functions | |
| __construct ($db) | |
| Constructor. | |
| getDesc () | |
| Return description of email selector. | |
| getSqlToExcludeUnsubscribed ($emailfield) | |
| Return the SQL fragment that excludes email addresses which opted out of emailings for the current entity. | |
| getNbOfRecords () | |
| Return number of records for email selector. | |
| getNbOfRecipients ($sql) | |
| Return the number of recipients. | |
| formFilter () | |
| Displays filter form that appears on the mailing recipient selection page. | |
| update_nb ($mailing_id) | |
| Update the number of recipients. | |
| addTargetsToDatabase ($mailing_id, $cibles) | |
| Add a list of targets into the database. | |
| clear_target ($mailing_id) | |
| Deletes all recipients from the targets table. | |
| getSqlArrayForStats () | |
| On the main mailing area, there is a box with statistics. | |
| add_to_target ($mailing_id) | |
| Add destinations in the targets table. | |
Static Public Member Functions | |
| static | getEmailingSelectorsList ($forcedir=null) |
| Return list of widget. | |
Parent class of emailing target selectors modules.
Definition at line 33 of file modules_mailings.php.
| MailingTargets::__construct | ( | $db | ) |
Constructor.
Reimplemented in mailing_advthirdparties, mailing_contacts1, mailing_eventorganization, mailing_fraise, mailing_mailing_mymodule_selector1, mailing_partnership, mailing_pomme, mailing_thirdparties, mailing_thirdparties_services_expired, mailing_xinputfile, and mailing_xinputuser.
Definition at line 87 of file modules_mailings.php.
| MailingTargets::add_to_target | ( | $mailing_id | ) |
Add destinations in the targets table.
| int | $mailing_id | Id of emailing |
Reimplemented in mailing_contacts1, mailing_eventorganization, mailing_fraise, mailing_mailing_mymodule_selector1, mailing_partnership, mailing_pomme, mailing_thirdparties, mailing_thirdparties_services_expired, mailing_xinputfile, and mailing_xinputuser.
Definition at line 483 of file modules_mailings.php.
References dol_syslog().
| MailingTargets::addTargetsToDatabase | ( | $mailing_id, | |
| $cibles ) |
Add a list of targets into the database.
| int | $mailing_id | Id of emailing |
| array<array{fk_contact?:int,lastname:string,firstname:string,email:string,other:string,source_url:string,source_id?:int,source_type:string,id?:int}> | $cibles Array with targets |
Definition at line 222 of file modules_mailings.php.
References $conf, dol_hash(), dol_print_error(), dol_syslog(), getDolGlobalString(), and update_nb().
| MailingTargets::clear_target | ( | $mailing_id | ) |
Deletes all recipients from the targets table.
| int | $mailing_id | Id of emailing |
Definition at line 314 of file modules_mailings.php.
References dol_syslog(), and update_nb().
| MailingTargets::formFilter | ( | ) |
Displays filter form that appears on the mailing recipient selection page.
Reimplemented in mailing_advthirdparties, mailing_contacts1, mailing_eventorganization, mailing_fraise, mailing_mailing_mymodule_selector1, mailing_partnership, mailing_pomme, mailing_thirdparties, mailing_thirdparties_services_expired, mailing_xinputfile, and mailing_xinputuser.
Definition at line 179 of file modules_mailings.php.
| MailingTargets::getDesc | ( | ) |
Return description of email selector.
Definition at line 97 of file modules_mailings.php.
References name.
|
static |
Return list of widget.
Function used by admin page htdoc/admin/widget. List is sorted by widget filename so by priority to run.
| ?array<string> | $forcedir null=All default directories. This parameter is used by modulebuilder module only. |
Definition at line 335 of file modules_mailings.php.
References $db, dol_buildpath(), dol_osencode(), img_object(), and img_picto().
| MailingTargets::getNbOfRecipients | ( | $sql | ) |
Return the number of recipients.
| string | $sql | Sql request to count |
Reimplemented in mailing_advthirdparties, mailing_contacts1, mailing_eventorganization, mailing_fraise, mailing_mailing_mymodule_selector1, mailing_partnership, mailing_pomme, mailing_thirdparties, mailing_thirdparties_services_expired, mailing_xinputfile, and mailing_xinputuser.
Definition at line 159 of file modules_mailings.php.
| MailingTargets::getNbOfRecords | ( | ) |
Return number of records for email selector.
Definition at line 148 of file modules_mailings.php.
| MailingTargets::getSqlArrayForStats | ( | ) |
On the main mailing area, there is a box with statistics.
If you want to add a line in this report you must provide an array of SQL request that returns two field: One called "label", One called "nb".
Reimplemented in mailing_advthirdparties, mailing_contacts1, mailing_eventorganization, mailing_fraise, mailing_mailing_mymodule_selector1, mailing_partnership, mailing_pomme, mailing_thirdparties, mailing_thirdparties_services_expired, mailing_xinputfile, and mailing_xinputuser.
Definition at line 468 of file modules_mailings.php.
References dol_syslog().
| MailingTargets::getSqlToExcludeUnsubscribed | ( | $emailfield | ) |
Return the SQL fragment that excludes email addresses which opted out of emailings for the current entity.
Returns an empty string when the selector is configured to keep unsubscribed addresses ($this->evenunsubscribe).
| string | $emailfield | SQL expression of the email column to test (e.g. 's.email', 'c.email'); it is passed through $db->sanitize() |
Definition at line 127 of file modules_mailings.php.
References $conf.
Referenced by mailing_contacts1\add_to_target(), mailing_eventorganization\add_to_target(), mailing_fraise\add_to_target(), mailing_partnership\add_to_target(), mailing_pomme\add_to_target(), mailing_thirdparties\add_to_target(), mailing_thirdparties_services_expired\add_to_target(), mailing_advthirdparties\add_to_target_spec(), mailing_advthirdparties\getNbOfRecipients(), mailing_contacts1\getNbOfRecipients(), mailing_eventorganization\getNbOfRecipients(), mailing_fraise\getNbOfRecipients(), mailing_partnership\getNbOfRecipients(), mailing_pomme\getNbOfRecipients(), mailing_thirdparties\getNbOfRecipients(), and mailing_thirdparties_services_expired\getNbOfRecipients().
| MailingTargets::update_nb | ( | $mailing_id | ) |
Update the number of recipients.
| int | $mailing_id | Id of emailing |
Definition at line 191 of file modules_mailings.php.
References dol_syslog().
Referenced by addTargetsToDatabase(), and clear_target().