WorkFlows
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- DataSQL constructor.
- addError() : mixed
- Add an error in the class
- getERPEmailMessage() : mixed
- Retrieve an email template from the ERP
- getERPEmailTemplate() : mixed
- Retrieve an email template from the ERP
- getMandrillDomains() : array<string|int, mixed>|void
- Retrive Mandrill Domains
- getMandrillMessageContent() : array<string|int, mixed>|void
- Retrive Mandrill message content
- getMandrillMessageInfo() : array<string|int, mixed>|void
- Retrive Mandrill message info
- getMandrillSenders() : array<string|int, mixed>|void
- Retrive Mandrill Senders used in the email marketing
- getMandrillTemplate() : array<string|int, mixed>|void
- Retrive a email template with if $slug
- getMandrillTemplates() : array<string|int, mixed>|void
- SET API for mandrill interation and SETUP $this->mandrill
- getMandrillWebHooks() : array<string|int, mixed>|void
- Retrive Mandrill WebHooks
- renderMandrillTemplate() : string|void
- Retrive a email template with if $slug
- sendERPEmail() : mixed
- Send an email using CLOUDFRAMEWORK CLOUD-CHANNELS/EMAIL
- sendMandrillEmail() : mixed
- SET API for mandrill interation and SETUP $this->mandrill
- setMandrillApiKey() : mixed
- SET API for mandrill interation and SETUP $this->mandrill
- getEntityFromMandrillMessage() : array<string|int, mixed>
- Return an array with the structure of ds:CloudFrameWorkEmails taking Mandrill $message array info
- getEntityTransformedWithMandrillTemplateData() : array<string|int, mixed>
- Return an array with the structure of ds:CloudFrameWorkEmailTemplates taking Mandrill $template array info
Properties
$cfos
public
CFOs
$cfos
= \null
$core
public
Core7
$core
$error
public
mixed
$error
= \false
$errorMsg
public
mixed
$errorMsg
= []
$mandrill
public
Mandrill
$mandrill
$version
public
mixed
$version
= '20230122'
Methods
__construct()
DataSQL constructor.
public
__construct(Core &$core, CFOs &$cfos) : mixed
Parameters
- $core : Core
- $cfos : CFOs
addError()
Add an error in the class
public
addError( $value) : mixed
Parameters
getERPEmailMessage()
Retrieve an email template from the ERP
public
getERPEmailMessage(string $id[, string $type = 'Mandrill' ][, mixed $update_processing = null ]) : mixed
Parameters
- $id : string
- $type : string = 'Mandrill'
- $update_processing : mixed = null
getERPEmailTemplate()
Retrieve an email template from the ERP
public
getERPEmailTemplate(string $slug[, string $type = 'Mandrill' ]) : mixed
Parameters
- $slug : string
- $type : string = 'Mandrill'
getMandrillDomains()
Retrive Mandrill Domains
public
getMandrillDomains() : array<string|int, mixed>|void
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server [{ [0] => domain [1] => created_at [2] => last_tested_at [3] => spf [4] => dkim [5] => verified_at [6] => valid_signing [7] => verify_txt_key }]
getMandrillMessageContent()
Retrive Mandrill message content
public
getMandrillMessageContent(string $id) : array<string|int, mixed>|void
Parameters
- $id : string
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server [{ [0] => subject [1] => from_email [2] => from_name [3] => tags [4] => to [5] => html [6] => headers [7] => attachments [8] => text [9] => ts [10] => _id }]
getMandrillMessageInfo()
Retrive Mandrill message info
public
getMandrillMessageInfo(string $id) : array<string|int, mixed>|void
Parameters
- $id : string
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server [{ [0] => ts [1] => _id [2] => state [3] => subject [4] => email [5] => tags [6] => opens [7] => clicks [8] => smtp_events [9] => resends [10] => sender [11] => template [12] => opens_detail [13] => clicks_detail }]
getMandrillSenders()
Retrive Mandrill Senders used in the email marketing
public
getMandrillSenders() : array<string|int, mixed>|void
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server [{ [0] => sent [1] => hard_bounces [2] => soft_bounces [3] => rejects [4] => complaints [5] => unsubs [6] => opens [7] => clicks [8] => unique_opens [9] => unique_clicks [10] => reputation [11] => address }]
getMandrillTemplate()
Retrive a email template with if $slug
public
getMandrillTemplate( $slug) : array<string|int, mixed>|void
Parameters
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server
getMandrillTemplates()
SET API for mandrill interation and SETUP $this->mandrill
public
getMandrillTemplates([ $label = null ]) : array<string|int, mixed>|void
Parameters
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server
getMandrillWebHooks()
Retrive Mandrill WebHooks
public
getMandrillWebHooks() : array<string|int, mixed>|void
Return values
array<string|int, mixed>|void —if there is no error it returns the array of templates in the server
renderMandrillTemplate()
Retrive a email template with if $slug
public
renderMandrillTemplate( $slug, $data) : string|void
Parameters
Return values
string|void —HTML of the template or false if ERROR
sendERPEmail()
Send an email using CLOUDFRAMEWORK CLOUD-CHANNELS/EMAIL
public
sendERPEmail(array<string|int, mixed> &$params[, string $type = 'Mandrill' ][, string $linked_object = '' ][, string $linked_id = '' ]) : mixed
Parameters
- $params : array<string|int, mixed>
-
{ Parameters by reference to send an email. - slug string Template Id to send - from string email from sender. [optional] if the Mandrill Template has DefaultFromEmail - name string [optional] name from sender. - subject string email subject. [optional] if the Mandrill Template has DefaultSubject - to string|array email/s to send the email. If it is string the emails has to be separated by ','. If it is an array it has to be an array of objects with the following structure: ['email'=>(string),'name'=>(optional string) - cc string|array [optional] email/s to send the email in cc. If it is string the emails has to be separated by ','. If it is an array it has to be an array of objects with the following structure: ['email'=>(string),'name'=>(optional string) - bcc string [optional] email to send a copy in bcc - reply_to string [optional] email to redirect the replies of the email - cat string [optional] Category for the email. If it is not sent it will take the Category of the email template - data array [optional] array of objects [key=>value] to be sent as variables to merge with the template - tags array [optional] array tags to add to the emial [tag1,tag2..] - attachments array [optional] array objects to be sent as attachments. Format of each object: ['type'=>'{mime-type}(example:application/pdf)','name'=>'{filename}(example:file.pdf)','content'=>base64_encode({file-content})]; }
- $type : string = 'Mandrill'
-
[optional] has to value: Mandrill
- $linked_object : string = ''
-
[optional] add this value to the ds:CloudFrameWorkEmailsSubmissions.LinkedObject
- $linked_id : string = ''
-
[optional] add this value to the ds:CloudFrameWorkEmailsSubmissions.LinkedId
sendMandrillEmail()
SET API for mandrill interation and SETUP $this->mandrill
public
sendMandrillEmail(array<string|int, mixed> &$params) : mixed
Parameters
- $params : array<string|int, mixed>
-
{ info to be sent in the email - from string email from sender. [optional] if the Mandrill Template has DefaultFromEmail - name string name from sender. [optional] if the Mandrill Template has DefaultFromEmail - subject string email subject. [optional] if the Mandrill Template has DefaultSubject - to string|array email/s to send the email. If it is string the emails has to be separated by ','. If it is an array it has to be an array of objects with the following structure: ['email'=>(string),'name'=>(optional string) - cc string|array [optional] email/s to send the email in cc. If it is string the emails has to be separated by ','. If it is an array it has to be an array of objects with the following structure: ['email'=>(string),'name'=>(optional string) - bcc string [optional] email to send a copy in bcc - reply_to string [optional] email to redirect the replies of the email - data array [optional] array of objects [key=>value] to be sent as variables to merge with the template - tags array [optional] array tags to add to the emial [tag1,tag2..] - attachments array [optional] array objects to be sent as attachments. Format of each object: ['type'=>'{mime-type}(example:application/pdf)','name'=>'{filename}(example:file.pdf)','content'=>base64_encode({file-content})]; }
Tags
setMandrillApiKey()
SET API for mandrill interation and SETUP $this->mandrill
public
setMandrillApiKey( $apiKey) : mixed
Parameters
Tags
getEntityFromMandrillMessage()
Return an array with the structure of ds:CloudFrameWorkEmails taking Mandrill $message array info
private
getEntityFromMandrillMessage(array<string|int, mixed> $entity, array<string|int, mixed> $message[, array<string|int, mixed> $info = [] ][, mixed $update_processing = null ]) : array<string|int, mixed>
Parameters
- $entity : array<string|int, mixed>
- $message : array<string|int, mixed>
- $info : array<string|int, mixed> = []
- $update_processing : mixed = null
Return values
array<string|int, mixed> —value of $entity modified with template variables
getEntityTransformedWithMandrillTemplateData()
Return an array with the structure of ds:CloudFrameWorkEmailTemplates taking Mandrill $template array info
private
getEntityTransformedWithMandrillTemplateData(array<string|int, mixed> $entity, array<string|int, mixed> $template) : array<string|int, mixed>
Parameters
- $entity : array<string|int, mixed>
- $template : array<string|int, mixed>
Return values
array<string|int, mixed> —value of $entity modified with template variables