dolibarr 19.0.4
PartnershipUtils Class Reference

Class with cron tasks of Partnership module. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 doCancelStatusOfMemberPartnership ()
 Action executed by scheduler to cancel status of partnership when subscription is expired + x days.
 
 doWarningOfPartnershipIfDolibarrBacklinkNotfound ($maxpercall=0)
 Action executed by scheduler to check if Dolibarr backlink not found on partner website.
 

Public Attributes

 $db
 To store db handler.
 
 $error
 To return error code (or message)
 
 $errors = array()
 To return several error codes (or messages)
 

Private Member Functions

 checkDolibarrBacklink ($website=null)
 Action to check if Dolibarr backlink not found on partner website.
 

Detailed Description

Class with cron tasks of Partnership module.

Definition at line 38 of file partnershiputils.class.php.

Constructor & Destructor Documentation

◆ __construct()

PartnershipUtils::__construct ( $db)

Constructor.

Parameters
DoliDb$dbDatabase handler

Definition at line 52 of file partnershiputils.class.php.

References $db.

Member Function Documentation

◆ checkDolibarrBacklink()

PartnershipUtils::checkDolibarrBacklink ( $website = null)
private

Action to check if Dolibarr backlink not found on partner website.

Parameters
string$websitePartner's website URL
Returns
int 0 if KO, 1 if OK

Definition at line 517 of file partnershiputils.class.php.

References $error, dol_syslog(), getDolGlobalString(), and getURLContent().

Referenced by doWarningOfPartnershipIfDolibarrBacklinkNotfound().

◆ doCancelStatusOfMemberPartnership()

PartnershipUtils::doCancelStatusOfMemberPartnership ( )

Action executed by scheduler to cancel status of partnership when subscription is expired + x days.

(Max number of action batch per call = $conf->global->PARTNERSHIP_MAX_EXPIRATION_CANCEL_PER_CALL)

CAN BE A CRON TASK

Returns
int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)

Definition at line 64 of file partnershiputils.class.php.

References $error, complete_substitutions_array(), dol_now(), dol_string_nospecial(), dol_syslog(), dol_time_plus_duree(), getCommonSubstitutionArray(), getDolGlobalInt(), getDolGlobalString(), GETPOST(), and make_substitutions().

◆ doWarningOfPartnershipIfDolibarrBacklinkNotfound()

PartnershipUtils::doWarningOfPartnershipIfDolibarrBacklinkNotfound ( $maxpercall = 0)

Action executed by scheduler to check if Dolibarr backlink not found on partner website.

(Max number of action batch per call = $conf->global->PARTNERSHIP_MAX_WARNING_BACKLINK_PER_CALL)

CAN BE A CRON TASK

Parameters
int$maxpercallMax per call
Returns
int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)

Definition at line 277 of file partnershiputils.class.php.

References $error, checkDolibarrBacklink(), complete_substitutions_array(), dol_now(), dol_string_nospecial(), dol_syslog(), getCommonSubstitutionArray(), getDolGlobalInt(), getDolGlobalString(), GETPOST(), and make_substitutions().


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