_stateMachine = new CRM_Group_StateMachine($this, $action); // create and instantiate the pages $this->addPages($this->_stateMachine, $action); // hack for now, set Search to Basic mode $this->_pages['Basic']->setAction(CRM_Core_Action::BASIC); // add all the actions $config = CRM_Core_Config::singleton(); // to handle file type custom data $uploadDir = $config->uploadDir; $uploadNames = $this->get('uploadNames'); if (!empty($uploadNames)) { $uploadNames = array_merge($uploadNames, CRM_Core_BAO_File::uploadNames() ); } else { $uploadNames = CRM_Core_BAO_File::uploadNames(); } // add all the actions $this->addActions($uploadDir, $uploadNames); } /** * @return mixed */ public function run() { return parent::run(); } /** * @return mixed */ public function selectorName() { return $this->get('selectorName'); } }