Merge pull request #15326 from totten/master-headfoot-2
[civicrm-core.git] / CRM / Event / Badge / Simple.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12
13/*
e70a7fc0
TO
14 * Copyright (C) 2010 Tech To The People
15 * Licensed to CiviCRM under the Academic Free License version 3.0.
16 *
17 */
6a488035
TO
18
19/**
20 *
21 * @package CRM
22 *
23 */
24class CRM_Event_Badge_Simple extends CRM_Event_Badge {
25
0cf587a7
EM
26 /**
27 * @param $participant
28 */
6a488035
TO
29 public function generateLabel($participant) {
30 $date = CRM_Utils_Date::customFormat($participant['event_start_date'], "%e %b");
31 $this->pdf->SetFontSize(8);
32 $y = $this->pdf->GetY();
33 $x = $this->pdf->GetAbsX();
34 $this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['event_title'], 0, 1, "L");
35 $this->pdf->SetXY($x, $y + 4);
36 $this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $date, 0, 2, "R");
37 $this->pdf->SetFontSize(12);
38 $this->pdf->SetXY($x, $this->pdf->GetY() + 5);
39 $this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['display_name'], 0, 2, "C");
40 $this->pdf->SetFontSize(10);
41 $this->pdf->SetXY($x, $this->pdf->GetY() + 2);
42 $this->pdf->Cell($this->pdf->width, $this->pdf->lineHeight, $participant['current_employer'], 0, 2, "C");
43 //$this->pdf->MultiCell ($this->pdf->width, $this->pdf->lineHeight, $txt,1,"L");
44 }
96025800 45
6a488035 46}