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.
Properties
static protected | $tokenCategories | from CRM_Contact_Form_Task_PDFLetterCommon |
Methods
Build all the data structures needed to build the form.
Build the form object.
Form rule.
Handle the template processing part of the form
Part of the post process which prepare and extract information from the template.
Process the form after the input has been submitted and validated.
No description
Get the categories required for rendering tokens.
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.
No description
Details
in CRM_Contact_Form_Task_PDFLetterCommon at line 60
static
preProcess($form)
Build all the data structures needed to build the form.
at line 14
static
buildQuickForm($form)
Build the form object.
in CRM_Core_Form_Task_PDFLetterCommon at line 188
static
setDefaultValues()
Set default values.
in CRM_Core_Form_Task_PDFLetterCommon at line 206
static bool
formRule(array $fields, array $files, array $self)
Form rule.
in CRM_Core_Form_Task_PDFLetterCommon at line 239
static
processTemplate($formValues)
Handle the template processing part of the form
in CRM_Core_Form_Task_PDFLetterCommon at line 299
static
formatMessage($message)
in CRM_Contact_Form_Task_PDFLetterCommon at line 45
static array
getLoggingOptions()
in CRM_Contact_Form_Task_PDFLetterCommon at line 81
static
preProcessSingle(CRM_Core_Form $form, int $cid)
in CRM_Contact_Form_Task_PDFLetterCommon at line 98
static array
processMessageTemplate(array $formValues)
Part of the post process which prepare and extract information from the template.
at line 29
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 246
static array
createActivities(CRM_Core_Form $form, string $html_message, array $contactIds, string $subject, int $campaign_id, array $perContactHtml = [])
in CRM_Contact_Form_Task_PDFLetterCommon at line 337
static protected array
getTokenCategories()
Get the categories required for rendering tokens.
in CRM_Contact_Form_Task_PDFLetterCommon at line 359
static protected bool
isLiveMode(CRM_Core_Form $form)
Is the form in live mode (as opposed to being run as a preview).
Returns true if the user has clicked the Download Document button on a Print/Merge Document (PDF Letter) search task form, or false if the Preview button was clicked.
at line 177
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 201
static bool
isHtmlTokenInTableCell(string $token, string $entity, string $textToSearch)
Check that the token only appears in a table cell. The '
at line 257
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 321
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 338
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 358
static bool
emailLetter(array $contact, string $html, $is_pdf, array $format = [], array $params = [])
Send pdf by email.