4 * Class CRM_Event_Badge_Logo
6 class CRM_Event_Badge_Logo
extends CRM_Event_Badge
{
10 public function __construct() {
11 parent
::__construct();
21 'lMargin' => ($pw - $w * 2) / 2,
22 'tMargin' => ($ph - $h * 5) / 2,
31 $this->lMarginLogo
= 20;
32 $this->tMarginName
= 20;
33 // $this->setDebug ();
39 public function generateLabel($participant) {
40 $x = $this->pdf
->GetAbsX();
41 $y = $this->pdf
->GetY();
42 $this->printBackground(TRUE);
43 $this->pdf
->SetLineStyle([
48 'color' => [0, 0, 200],
51 $this->pdf
->SetFontSize(8);
52 $this->pdf
->MultiCell($this->pdf
->width
- $this->lMarginLogo
, 0, $participant['event_title'], $this->border
, "L", 0, 1, $x +
$this->lMarginLogo
, $y);
54 $this->pdf
->SetXY($x, $y +
$this->pdf
->height
- 5);
55 $date = CRM_Utils_Date
::customFormat($participant['event_start_date'], "%e %b");
56 $this->pdf
->Cell($this->pdf
->width
, 0, $date, $this->border
, 2, "R");
58 $this->pdf
->SetFontSize(15);
59 $this->pdf
->MultiCell($this->pdf
->width
, 10, $participant['display_name'], $this->border
, "C", 0, 1, $x, $y +
$this->tMarginName
);
60 $this->pdf
->SetFontSize(10);
61 $this->pdf
->MultiCell($this->pdf
->width
, 0, $participant['current_employer'], $this->border
, "C", 0, 1, $x, $this->pdf
->getY());