4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 * $Id: PDF.php 45499 2013-02-08 12:31:05Z kurund $
21 * This class provides the functionality to create PDF letter for a group of
22 * participants or a single participant.
24 class CRM_Event_Form_Task_PDF
extends CRM_Event_Form_Task
{
26 use CRM_Contact_Form_Task_PDFTrait
;
29 * Are we operating in "single mode", i.e. printing letter to one
30 * specific participant?
34 public $_single = FALSE;
37 * All the existing templates in the system.
41 public $_templates = NULL;
43 public $_activityId = NULL;
46 * Build all the data structures needed to build the form.
48 public function preProcess() {
49 $this->preProcessPDF();
52 // we have all the participant ids, so now we get the contact ids
53 parent
::setContactIDs();
55 $this->assign('single', $this->_single
);
59 * Process the form after the input has been submitted and validated.
61 public function postProcess() {
62 CRM_Contact_Form_Task_PDFLetterCommon
::postProcess($this);
66 * List available tokens for this form.
70 public function listTokens() {
71 $tokens = CRM_Core_SelectValues
::contactTokens();