Documentation

CRM_Badge_BAO_Badge
in package

Class CRM_Badge_Format_Badge.

parent class for building name badges

Table of Contents

Properties

$border  : int
$debug  : bool
$pdf  : CRM_Utils_PDF_Label

Methods

buildBadges()  : mixed
Build badges parameters before actually creating badges.
createLabels()  : mixed
This function is called to create name label pdf.
formatLabel()  : array<string|int, mixed>
Function to create structure and add meta data according to layout.
generateLabel()  : void
getImageProperties()  : array<string|int, int>
labelCreator()  : mixed
printImage()  : mixed
Helper function to print images.

Properties

$border

public int $border = 0

$debug

public bool $debug = \FALSE

Methods

buildBadges()

Build badges parameters before actually creating badges.

public static buildBadges(array<string|int, mixed> &$params, CRM_Core_Form &$form) : mixed
Parameters
$params : array<string|int, mixed>

Associated array of submitted values.

$form : CRM_Core_Form

createLabels()

This function is called to create name label pdf.

public createLabels(array<string|int, mixed> $participants, array<string|int, mixed> &$layoutInfo) : mixed
Parameters
$participants : array<string|int, mixed>

Associated array with participant info.

$layoutInfo : array<string|int, mixed>

Associated array which contains meta data about format/layout.

formatLabel()

Function to create structure and add meta data according to layout.

public static formatLabel(array<string|int, mixed> $row, array<string|int, mixed> $layout) : array<string|int, mixed>
Parameters
$row : array<string|int, mixed>

Row element that needs to be formatted.

$layout : array<string|int, mixed>

Layout meta data.

Return values
array<string|int, mixed>

row with meta data

generateLabel()

public generateLabel(array<string|int, mixed> $formattedRow) : void
Parameters
$formattedRow : array<string|int, mixed>

getImageProperties()

public static getImageProperties(string $img[, int $imgRes = 300 ][, int|null $w = NULL ][, int|null $h = NULL ]) : array<string|int, int>
Parameters
$img : string

Filename

$imgRes : int = 300
$w : int|null = NULL
$h : int|null = NULL
Return values
array<string|int, int>

[width, height]

labelCreator()

public labelCreator(array<string|int, mixed> $formattedRow[, int $cellspacing = 0 ]) : mixed
Parameters
$formattedRow : array<string|int, mixed>
$cellspacing : int = 0

printImage()

Helper function to print images.

public printImage(string $img[, string|null $x = NULL ][, string|null $y = NULL ][, int|null $w = NULL ][, int|null $h = NULL ]) : mixed
Parameters
$img : string

Image url.

$x : string|null = NULL
$y : string|null = NULL
$w : int|null = NULL
$h : int|null = NULL

        
On this page

Search results