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
17 class CRM_Group_Controller
extends CRM_Core_Controller
{
23 * @param bool|int $action
26 public function __construct($title = NULL, $action = CRM_Core_Action
::NONE
, $modal = TRUE) {
27 parent
::__construct($title, $modal);
29 $this->_stateMachine
= new CRM_Group_StateMachine($this, $action);
31 // create and instantiate the pages
32 $this->addPages($this->_stateMachine
, $action);
34 // hack for now, set Search to Basic mode
35 $this->_pages
['Basic']->setAction(CRM_Core_Action
::BASIC
);
37 // add all the actions
38 $config = CRM_Core_Config
::singleton();
40 // to handle file type custom data
41 $uploadDir = $config->uploadDir
;
43 $uploadNames = $this->get('uploadNames');
44 if (!empty($uploadNames)) {
45 $uploadNames = array_merge($uploadNames,
46 CRM_Core_BAO_File
::uploadNames()
50 $uploadNames = CRM_Core_BAO_File
::uploadNames();
53 // add all the actions
54 $this->addActions($uploadDir, $uploadNames);
60 public function run() {
67 public function selectorName() {
68 return $this->get('selectorName');