Search.php 2.6 KB
Newer Older
totten's avatar
totten committed
1 2 3
<?php
/*
 +--------------------------------------------------------------------+
yashodha's avatar
yashodha committed
4
 | CiviCRM version 4.6                                                |
totten's avatar
totten committed
5
 +--------------------------------------------------------------------+
kurund's avatar
kurund committed
6
 | Copyright CiviCRM LLC (c) 2004-2014                                |
totten's avatar
totten committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007.                                       |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License along with this program; if not, contact CiviCRM LLC       |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
25
 */
totten's avatar
totten committed
26 27 28 29

/**
 *
 * @package CRM
kurund's avatar
kurund committed
30
 * @copyright CiviCRM LLC (c) 2004-2014
totten's avatar
totten committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
 * $Id$
 *
 */

/**
 * This class is used by the Search functionality.
 *
 *  - the search controller is used for building/processing multiform
 *    searches.
 *
 * Typically the first form will display the search criteria and it's results
 *
 * The second form is used to process search results with the asscociated actions
 *
 */
class CRM_Activity_Controller_Search extends CRM_Core_Controller {

  /**
colemanw's avatar
colemanw committed
49
   * Class constructor
Eileen McNaughton's avatar
Eileen McNaughton committed
50 51 52
   * @param null $title
   * @param bool $modal
   * @param int|mixed|null $action
totten's avatar
totten committed
53
   */
54
  public function __construct($title = NULL, $modal = TRUE, $action = CRM_Core_Action::NONE) {
totten's avatar
totten committed
55 56 57 58 59 60 61 62 63 64 65 66

    parent::__construct($title, $modal);

    $this->_stateMachine = new CRM_Activity_StateMachine_Search($this, $action);

    // create and instantiate the pages
    $this->addPages($this->_stateMachine, $action);

    // add all the actions
    $this->addActions();
  }

67 68 69
  /**
   * @return mixed
   */
totten's avatar
totten committed
70 71 72
  public function selectorName() {
    return $this->get('selectorName');
  }
73

totten's avatar
totten committed
74
}