class CRM_Member_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDFLetterCommon

This class provides the common functionality for creating PDF letter for members

Properties

static protected $tokenCategories from CRM_Contact_Form_Task_PDFLetterCommon

Methods

static 
preProcess($form)

Build all the data structures needed to build the form.

static 
buildQuickForm($form)

Build the form object.

static 
setDefaultValues()

Set default values.

static bool
formRule(array $fields, array $files, array $self)

Form rule.

static 
processTemplate($formValues)

Handle the template processing part of the form

static 
formatMessage($message)

No description

static array
getLoggingOptions()

No description

static 
preProcessSingle(CRM_Core_Form $form, int $cid)

No description

static array
processMessageTemplate(array $formValues)

Part of the post process which prepare and extract information from the template.

static 
postProcess(CRM_Core_Form $form)

Process the form after the input has been submitted and validated.

static array
createActivities(CRM_Core_Form $form, string $html_message, array $contactIds, string $subject, int $campaign_id, array $perContactHtml = [])

No description

static array
getTokenCategories()

Get the categories required for rendering tokens.

static bool
isLiveMode(CRM_Core_Form $form)

Is the form in live mode (as opposed to being run as a preview).

static 
postProcessMembers(CRM_Core_Form $form, $membershipIDs, $skipOnHold, $skipDeceased, $contactIDs)

Process the form after the input has been submitted and validated.

static array
generateHTML(array $membershipIDs, array $returnProperties, bool $skipOnHold, bool $skipDeceased, array $messageToken, $html_message, $categories)

Generate htmlfor pdf letters.

Details

static preProcess($form)

Build all the data structures needed to build the form.

Parameters

$form

static buildQuickForm($form)

Build the form object.

Parameters

$form

static setDefaultValues()

Set default values.

static bool formRule(array $fields, array $files, array $self)

Form rule.

Parameters

array $fields The input form values.
array $files
array $self Additional values form 'this'.

Return Value

bool TRUE if no errors, else array of errors.

static processTemplate($formValues)

Handle the template processing part of the form

Parameters

$formValues

static formatMessage($message)

Parameters

$message

static array getLoggingOptions()

Return Value

array Array(string $machineName => string $label).

static preProcessSingle(CRM_Core_Form $form, int $cid)

Parameters

CRM_Core_Form $form
int $cid

static array processMessageTemplate(array $formValues)

Part of the post process which prepare and extract information from the template.

Parameters

array $formValues

Return Value

array [$categories, $html_message, $messageToken, $returnProperties]

static postProcess(CRM_Core_Form $form)

Process the form after the input has been submitted and validated.

Parameters

CRM_Core_Form $form

Exceptions

CRM_Core_Exception

static array createActivities(CRM_Core_Form $form, string $html_message, array $contactIds, string $subject, int $campaign_id, array $perContactHtml = [])

Parameters

CRM_Core_Form $form
string $html_message
array $contactIds
string $subject
int $campaign_id
array $perContactHtml

Return Value

array List of activity IDs. There may be 1 or more, depending on the system-settings and use-case.

Exceptions

CRM_Core_Exception

static protected array getTokenCategories()

Get the categories required for rendering tokens.

Return Value

array

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.

Parameters

CRM_Core_Form $form

Return Value

bool TRUE if the Download Document button was clicked (also defaults to TRUE if the form controller does not exist), else FALSE

at line 20
static postProcessMembers(CRM_Core_Form $form, $membershipIDs, $skipOnHold, $skipDeceased, $contactIDs)

Process the form after the input has been submitted and validated.

Parameters

CRM_Core_Form $form
$membershipIDs
$skipOnHold
$skipDeceased
$contactIDs

at line 56
static array generateHTML(array $membershipIDs, array $returnProperties, bool $skipOnHold, bool $skipDeceased, array $messageToken, $html_message, $categories)

Generate htmlfor pdf letters.

Parameters

array $membershipIDs
array $returnProperties
bool $skipOnHold
bool $skipDeceased
array $messageToken
$html_message
$categories

Return Value

array