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
{
27 * Are we operating in "single mode", i.e. printing letter to one
28 * specific participant?
32 public $_single = FALSE;
35 * All the existing templates in the system.
39 public $_templates = NULL;
41 public $_activityId = NULL;
44 * Build all the data structures needed to build the form.
46 public function preProcess() {
47 CRM_Contact_Form_Task_PDFLetterCommon
::preProcess($this);
50 // we have all the participant ids, so now we get the contact ids
51 parent
::setContactIDs();
53 $this->assign('single', $this->_single
);
57 * Build the form object.
59 public function buildQuickForm() {
60 CRM_Contact_Form_Task_PDFLetterCommon
::buildQuickForm($this);
64 * Process the form after the input has been submitted and validated.
66 public function postProcess() {
67 CRM_Contact_Form_Task_PDFLetterCommon
::postProcess($this);
71 * Set default values for the form.
75 public function setDefaultValues() {
76 return CRM_Contact_Form_Task_PDFLetterCommon
::setDefaultValues();
80 * List available tokens for this form.
84 public function listTokens() {
85 $tokens = CRM_Core_SelectValues
::contactTokens();