3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 * This class provides the functionality to save a search
22 * Saved Searches are used for saving frequently used queries
24 class CRM_Event_Form_Task_SearchTaskHookSample
extends CRM_Event_Form_Task
{
27 * Build all the data structures needed to build the form.
31 public function preProcess() {
34 // display name and participation details of participants
35 $participantIDs = implode(',', $this->_participantIds
);
38 SELECT p.fee_amount as amount,
39 p.register_date as register_date,
41 ct.display_name as display_name
42 FROM civicrm_participant p
43 INNER JOIN civicrm_contact ct ON ( p.contact_id = ct.id )
44 WHERE p.id IN ( $participantIDs )";
46 $dao = CRM_Core_DAO
::executeQuery($query);
47 while ($dao->fetch()) {
49 'display_name' => $dao->display_name
,
50 'amount' => $dao->amount
,
51 'register_date' => CRM_Utils_Date
::customFormat($dao->register_date
),
52 'source' => $dao->source
,
55 $this->assign('rows', $rows);
59 * Build the form object.
63 public function buildQuickForm() {