info.xml - Fill in some FIXME's
[civicrm-core.git] / CRM / Group / Controller.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 class CRM_Group_Controller extends CRM_Core_Controller {
18
19 /**
20 * Class constructor.
21 *
22 * @param null $title
23 * @param bool|int $action
24 * @param bool $modal
25 */
26 public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
27 parent::__construct($title, $modal);
28
29 $this->_stateMachine = new CRM_Group_StateMachine($this, $action);
30
31 // create and instantiate the pages
32 $this->addPages($this->_stateMachine, $action);
33
34 // hack for now, set Search to Basic mode
35 $this->_pages['Basic']->setAction(CRM_Core_Action::BASIC);
36
37 // add all the actions
38 $config = CRM_Core_Config::singleton();
39
40 // to handle file type custom data
41 $uploadDir = $config->uploadDir;
42
43 $uploadNames = $this->get('uploadNames');
44 if (!empty($uploadNames)) {
45 $uploadNames = array_merge($uploadNames,
46 CRM_Core_BAO_File::uploadNames()
47 );
48 }
49 else {
50 $uploadNames = CRM_Core_BAO_File::uploadNames();
51 }
52
53 // add all the actions
54 $this->addActions($uploadDir, $uploadNames);
55 }
56
57 /**
58 * @return mixed
59 */
60 public function run() {
61 return parent::run();
62 }
63
64 /**
65 * @return mixed
66 */
67 public function selectorName() {
68 return $this->get('selectorName');
69 }
70
71 }