4 +--------------------------------------------------------------------+
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2020 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
32 * @copyright CiviCRM LLC (c) 2004-2020
33 * $Id: PDF.php 45499 2013-02-08 12:31:05Z kurund $
37 * This class provides the functionality to create PDF letter for a group of
38 * participants or a single participant.
40 class CRM_Event_Form_Task_PDF
extends CRM_Event_Form_Task
{
43 * Are we operating in "single mode", i.e. printing letter to one
44 * specific participant?
48 public $_single = FALSE;
51 * All the existing templates in the system.
55 public $_templates = NULL;
57 public $_activityId = NULL;
60 * Build all the data structures needed to build the form.
62 public function preProcess() {
63 CRM_Contact_Form_Task_PDFLetterCommon
::preProcess($this);
66 // we have all the participant ids, so now we get the contact ids
67 parent
::setContactIDs();
69 $this->assign('single', $this->_single
);
73 * Build the form object.
75 public function buildQuickForm() {
76 CRM_Contact_Form_Task_PDFLetterCommon
::buildQuickForm($this);
80 * Process the form after the input has been submitted and validated.
82 public function postProcess() {
83 CRM_Contact_Form_Task_PDFLetterCommon
::postProcess($this);
87 * Set default values for the form.
91 public function setDefaultValues() {
92 return CRM_Contact_Form_Task_PDFLetterCommon
::setDefaultValues();
96 * List available tokens for this form.
100 public function listTokens() {
101 $tokens = CRM_Core_SelectValues
::contactTokens();