Merge pull request #20226 from civicrm/5.37
[civicrm-core.git] / CRM / Contribute / Controller / Search.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/**
6a488035 13 * @package CRM
ca5cec67 14 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
15 */
16
17/**
18 * This class is used by the Search functionality.
19 *
20 * - the search controller is used for building/processing multiform
21 * searches.
22 *
301705fb 23 * Typically the first form will display the search criteria and its results
6a488035 24 *
ac3ab0e4 25 * The second form is used to process search results with the associated actions
6a488035
TO
26 *
27 */
28class CRM_Contribute_Controller_Search extends CRM_Core_Controller {
29
233e08f1 30 protected $entity = 'Contribution';
31
6a488035 32 /**
74ab7ba8
EM
33 * Class constructor.
34 *
35 * @param string $title
36 * @param bool|int $action
37 * @param bool $modal
233e08f1 38 *
39 * @throws \CRM_Core_Exception
6a488035 40 */
00be9182 41 public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
6a488035
TO
42
43 parent::__construct($title, $modal);
6a488035 44 $this->_stateMachine = new CRM_Contribute_StateMachine_Search($this, $action);
6a488035 45 $this->addPages($this->_stateMachine, $action);
6a488035 46 $this->addActions();
233e08f1 47 $this->set('entity', $this->entity);
6a488035 48 }
96025800 49
6a488035 50}