Commit | Line | Data |
---|---|---|
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 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | ||
18 | /** | |
19 | * This class is used by the Search functionality. | |
20 | * | |
21 | * - the search controller is used for building/processing multiform | |
22 | * searches. | |
23 | * | |
24 | * Typically the first form will display the search criteria and it's results | |
25 | * | |
fe482240 | 26 | * The second form is used to process search results with the associated actions |
6a488035 TO |
27 | * |
28 | */ | |
29 | class CRM_Activity_Controller_Search extends CRM_Core_Controller { | |
30 | ||
233e08f1 | 31 | protected $entity = 'Activity'; |
32 | ||
6a488035 | 33 | /** |
fe482240 EM |
34 | * Class constructor. |
35 | * | |
645ee340 EM |
36 | * @param null $title |
37 | * @param bool $modal | |
38 | * @param int|mixed|null $action | |
6a488035 | 39 | */ |
00be9182 | 40 | public function __construct($title = NULL, $modal = TRUE, $action = CRM_Core_Action::NONE) { |
6a488035 TO |
41 | |
42 | parent::__construct($title, $modal); | |
43 | ||
44 | $this->_stateMachine = new CRM_Activity_StateMachine_Search($this, $action); | |
45 | ||
fe482240 | 46 | // Create and instantiate the pages. |
6a488035 TO |
47 | $this->addPages($this->_stateMachine, $action); |
48 | ||
fe482240 | 49 | // Add all the actions. |
6a488035 | 50 | $this->addActions(); |
233e08f1 | 51 | $this->set('entity', $this->entity); |
6a488035 TO |
52 | } |
53 | ||
ffd93213 | 54 | /** |
fe482240 EM |
55 | * Getter for selectorName. |
56 | * | |
ffd93213 EM |
57 | * @return mixed |
58 | */ | |
6a488035 TO |
59 | public function selectorName() { |
60 | return $this->get('selectorName'); | |
61 | } | |
96025800 | 62 | |
6a488035 | 63 | } |