Cleanup uses of CRM_Utils_Array::value related to numbers
[civicrm-core.git] / CRM / Event / 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/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 * $Id$
17 *
18 */
19
20/**
21 * This class is used by the Search functionality.
22 *
23 * - the search controller is used for building/processing multiform
24 * searches.
25 *
301705fb 26 * Typically the first form will display the search criteria and its results
6a488035 27 *
ac3ab0e4 28 * The second form is used to process search results with the associated actions
6a488035
TO
29 *
30 */
31class CRM_Event_Controller_Search extends CRM_Core_Controller {
32
33 /**
fe482240 34 * Class constructor.
3bdf1f3a 35 *
36 * @param string $title
37 * @param bool|int $action
38 * @param bool $modal
6a488035 39 */
00be9182 40 public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
6a488035
TO
41
42 parent::__construct($title, $modal);
43
44 $this->_stateMachine = new CRM_Event_StateMachine_Search($this, $action);
45
46 // create and instantiate the pages
47 $this->addPages($this->_stateMachine, $action);
48
6a488035
TO
49 $session = CRM_Core_Session::singleton();
50 $uploadNames = $session->get('uploadNames');
51 if (!empty($uploadNames)) {
52 $uploadNames = array_merge($uploadNames,
53 CRM_Core_BAO_File::uploadNames()
54 );
55 }
56 else {
57 $uploadNames = CRM_Core_BAO_File::uploadNames();
58 }
59
60 $config = CRM_Core_Config::singleton();
61 $uploadDir = $config->uploadDir;
62
63 // add all the actions
64 $this->addActions($uploadDir, $uploadNames);
65 }
96025800 66
6a488035 67}