CRM_Contact_Form_Task_PDFLetterCommon
extends CRM_Core_Form_Task_PDFLetterCommon
in package
This class provides the common functionality for creating PDF letter for one or a group of contact ids.
since 5.59 will be removed around 5.89.
Table of Contents
Methods
- buildQuickForm() : mixed
- Build the form object.
- formatMessage() : mixed
- formRule() : bool
- Form rule.
- listTokens() : array<string|int, mixed>
- List the available tokens
- preProcess() : mixed
- processTemplate() : string
- Handle the template processing part of the form
- renderFromRows() : void
- Render html from rows
- setDefaultValues() : mixed
- Set default values.
- outputFromHtml() : mixed
- Output the pdf or word document from the generated html.
Methods
buildQuickForm()
Build the form object.
public
static buildQuickForm(mixed &$form) : mixed
Parameters
- $form : mixed
Tags
formatMessage()
public
static formatMessage(string &$message) : mixed
Parameters
- $message : string
formRule()
Form rule.
public
static formRule(array<string|int, mixed> $fields, array<string|int, mixed> $files, self $self) : bool
Parameters
- $fields : array<string|int, mixed>
-
The input form values.
- $files : array<string|int, mixed>
- $self : self
-
Additional values form 'this'.
Return values
bool —TRUE if no errors, else array of errors.
listTokens()
List the available tokens
public
static listTokens() : array<string|int, mixed>
Return values
array<string|int, mixed> —of token name => label
preProcess()
public
static preProcess(mixed &$form) : mixed
Parameters
- $form : mixed
processTemplate()
Handle the template processing part of the form
public
static processTemplate(array<string|int, mixed> &$formValues) : string
Parameters
- $formValues : array<string|int, mixed>
Tags
Return values
string —$html_message
renderFromRows()
Render html from rows
public
static renderFromRows(mixed $rows, string $msgPart, array<string|int, mixed> $formValues) : void
Parameters
- $rows : mixed
- $msgPart : string
-
The name registered with the TokenProcessor
- $formValues : array<string|int, mixed>
-
The values submitted through the form
setDefaultValues()
Set default values.
public
static setDefaultValues() : mixed
outputFromHtml()
Output the pdf or word document from the generated html.
protected
static outputFromHtml(array<string|int, mixed> $formValues, array<string|int, mixed> $html) : mixed
Parameters
- $formValues : array<string|int, mixed>
- $html : array<string|int, mixed>