CRM_Contribute_Form_Task_PDFLetterCommon
class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDFLetterCommon
This class provides the common functionality for creating PDF letter for one or a group of contact ids.
Methods
Form rule.
Part of the post process which prepare and extract information from the template.
Process the form after the input has been submitted and validated.
Check whether any of the tokens exist in the html outside a table cell.
Check that the token only appears in a table cell. The '
Generate the contribution array from the form, we fill in the contact details and determine any aggregation around contact_id of contribution_recur_id
We combine the contributions by adding the contribution to each field with the separator in between the existing value and the new one. We put the separator there even if empty so it is clear what the value for previous contributions was
We are going to retrieve the combined contribution and if smarty mail is enabled we will also assign an array of contributions for this contact to the smarty template
Send pdf by email.
Details
in CRM_Contact_Form_Task_PDFLetterCommon at line 43
static array
getLoggingOptions()
in CRM_Contact_Form_Task_PDFLetterCommon at line 58
static
preProcess(CRM_Core_Form $form)
Build all the data structures needed to build the form.
in CRM_Contact_Form_Task_PDFLetterCommon at line 78
static
preProcessSingle(CRM_Core_Form $form, int $cid)
in CRM_Contact_Form_Task_PDFLetterCommon at line 89
static
buildQuickForm($form)
Build the form object.
in CRM_Contact_Form_Task_PDFLetterCommon at line 220
static
setDefaultValues()
Set default values.
in CRM_Contact_Form_Task_PDFLetterCommon at line 238
static bool
formRule(array $fields, array $files, array $self)
Form rule.
in CRM_Contact_Form_Task_PDFLetterCommon at line 277
static array
processMessageTemplate(array $formValues)
Part of the post process which prepare and extract information from the template.
at line 15
static
postProcess(CRM_Core_Form $form, array $formValues = NULL)
Process the form after the input has been submitted and validated.
in CRM_Contact_Form_Task_PDFLetterCommon at line 473
static array
createActivities(CRM_Core_Form $form, string $html_message, array $contactIds)
in CRM_Contact_Form_Task_PDFLetterCommon at line 545
static
formatMessage($message)
at line 166
static bool
isValidHTMLWithTableSeparator($tokens, $html)
Check whether any of the tokens exist in the html outside a table cell.
If they do the table cell separator is not supported (return false) At this stage we are only anticipating contributions passed in this way but it would be easy to add others
at line 190
static bool
isHtmlTokenInTableCell($token, $entity, $textToSearch)
Check that the token only appears in a table cell. The '
at line 246
static array
buildContributionArray(string $groupBy, array $contributionIDs, array $returnProperties, bool $skipOnHold, bool $skipDeceased, array $messageToken, string $task, string $separator, bool $isIncludeSoftCredits)
Generate the contribution array from the form, we fill in the contact details and determine any aggregation around contact_id of contribution_recur_id
at line 320
static array
combineContributions(array $existing, array $contribution, string $separator)
We combine the contributions by adding the contribution to each field with the separator in between the existing value and the new one. We put the separator there even if empty so it is clear what the value for previous contributions was
at line 337
static
assignCombinedContributionValues(array $contact, array $contributions, $groupBy, int $groupByID)
We are going to retrieve the combined contribution and if smarty mail is enabled we will also assign an array of contributions for this contact to the smarty template
at line 360
static bool
emailLetter(array $contact, string $html, $is_pdf, array $format = array(), array $params = array())
Send pdf by email.