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 is used by the Search functionality.
23 * - the search controller is used for building/processing multiform
26 * Typically the first form will display the search criteria and its results
28 * The second form is used to process search results with the associated actions
31 class CRM_Event_Controller_Search
extends CRM_Core_Controller
{
36 * @param string $title
37 * @param bool|int $action
40 public function __construct($title = NULL, $action = CRM_Core_Action
::NONE
, $modal = TRUE) {
42 parent
::__construct($title, $modal);
44 $this->_stateMachine
= new CRM_Event_StateMachine_Search($this, $action);
46 // create and instantiate the pages
47 $this->addPages($this->_stateMachine
, $action);
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()
57 $uploadNames = CRM_Core_BAO_File
::uploadNames();
60 $config = CRM_Core_Config
::singleton();
61 $uploadDir = $config->uploadDir
;
63 // add all the actions
64 $this->addActions($uploadDir, $uploadNames);