Documentation

CRM_Contact_Form_Task_LabelCommon
in package

This class provides the common functionality for sending email to one or a group of contact ids.

Table of Contents

Methods

createLabel()  : mixed
Create labels (pdf).
getAddressReturnProperties()  : array<string|int, mixed>
Get array of return properties for address fields required for mailing label.
getRows()  : array<string|int, mixed>
Get the rows for the labels.
mergeSameHousehold()  : array<string|int, mixed>

Methods

createLabel()

Create labels (pdf).

public static createLabel(array<string|int, mixed> $contactRows, string $format[, string $fileName = 'MailingLabels_CiviCRM.pdf' ]) : mixed
Parameters
$contactRows : array<string|int, mixed>

Associated array of contact data.

$format : string

Format in which labels needs to be printed.

$fileName : string = 'MailingLabels_CiviCRM.pdf'

The name of the file to save the label in.

getAddressReturnProperties()

Get array of return properties for address fields required for mailing label.

public static getAddressReturnProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>

return properties for address e.g [street_address => 1, supplemental_address_1 => 1, supplemental_address_2 => 1]

getRows()

Get the rows for the labels.

public static getRows(array<string|int, mixed> $contactIDs, int $locationTypeID, bool $respectDoNotMail, bool $mergeSameAddress, bool $mergeSameHousehold) : array<string|int, mixed>
Parameters
$contactIDs : array<string|int, mixed>
$locationTypeID : int
$respectDoNotMail : bool
$mergeSameAddress : bool
$mergeSameHousehold : bool

UNUSED.

Return values
array<string|int, mixed>

Array of rows for labels

mergeSameHousehold()

public static mergeSameHousehold(array<string|int, mixed> &$rows) : array<string|int, mixed>
Parameters
$rows : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results