class PartnershipUtils (View source)

Class with cron tasks of Partnership module

Properties

DoliDB $db
string $error
string[] $errors
string $output

Methods

__construct($db)

Constructor

int
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)

int
doWarningOfPartnershipIfDolibarrBacklinkNotfound(int $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)

Details

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

int 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

Return Value

int

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

int doWarningOfPartnershipIfDolibarrBacklinkNotfound(int $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 $maxpercall

Max per call

Return Value

int

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