class CRM_Contact_Form_Task_LabelCommon

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

Methods

static 
createLabel(array $contactRows, string $format, string $fileName = 'MailingLabels_CiviCRM.pdf')

Create labels (pdf).

static array
getRows($contactIDs, int $locationTypeID, bool $respectDoNotMail, $mergeSameAddress, bool $mergeSameHousehold)

Get the rows for the labels.

static array
getAddressReturnProperties()

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

static array
getTokenData(array $contacts)

Get token list from mailing format & contacts

array
mergeSameHousehold(array $rows)

No description

Details

at line 49
static createLabel(array $contactRows, string $format, string $fileName = 'MailingLabels_CiviCRM.pdf')

Create labels (pdf).

Parameters

array $contactRows Associated array of contact data.
string $format Format in which labels needs to be printed.
string $fileName The name of the file to save the label in.

at line 81
static array getRows($contactIDs, int $locationTypeID, bool $respectDoNotMail, $mergeSameAddress, bool $mergeSameHousehold)

Get the rows for the labels.

Parameters

$contactIDs
int $locationTypeID
bool $respectDoNotMail
$mergeSameAddress
bool $mergeSameHousehold UNUSED.

Return Value

array Array of rows for labels

at line 253
static array getAddressReturnProperties()

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

Return Value

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

at line 270
static array getTokenData(array $contacts)

Get token list from mailing format & contacts

Parameters

array $contacts

Return Value

array

at line 299
array mergeSameHousehold(array $rows)

Parameters

array $rows

Return Value

array