Exemplo n.º 1
0
 public function preProcess()
 {
     $this->set('searchFormName', 'Custom');
     $this->set('context', 'custom');
     $csID = CRM_Utils_Request::retrieve('csid', 'Integer', $this);
     $ssID = CRM_Utils_Request::retrieve('ssID', 'Integer', $this);
     $gID = CRM_Utils_Request::retrieve('gid', 'Integer', $this);
     list($this->_customSearchID, $this->_customSearchClass, $formValues) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
     if (!$this->_customSearchID) {
         CRM_Core_Error::fatal('Could not get details for custom search.');
     }
     // stash this as a hidden element so we can potentially go there if the session
     // is reset but this is available in the POST
     $this->addElement('hidden', 'csid', $csID);
     if (!empty($formValues)) {
         $this->_formValues = $formValues;
     }
     // set breadcrumb to return to Custom Search listings page
     $breadCrumb = array(array('title' => ts('Custom Searches'), 'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list', 'reset=1')));
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
     // use the custom selector
     self::$_selectorName = 'CRM_Contact_Selector_Custom';
     $this->set('customSearchID', $this->_customSearchID);
     $this->set('customSearchClass', $this->_customSearchClass);
     parent::preProcess();
     // instantiate the new class
     $this->_customClass = new $this->_customSearchClass($this->_formValues);
     // CRM-12747
     if (isset($this->_customClass->_permissionedComponent) && !self::isPermissioned($this->_customClass->_permissionedComponent)) {
         CRM_Utils_System::permissionDenied();
     }
 }
Exemplo n.º 2
0
 /**
  * Function to actually build the form
  *
  * @return None
  * @access public
  */
 public function preProcess()
 {
     $this->set('searchFormName', 'Builder');
     $this->set('context', 'builder');
     parent::preProcess();
     // Get the block count
     $this->_blockCount = $this->get('blockCount');
     // Initialize new form
     if (!$this->_blockCount) {
         $this->_blockCount = 4;
         $this->set('newBlock', 1);
     }
     //get the column count
     $this->_columnCount = $this->get('columnCount');
     for ($i = 1; $i < $this->_blockCount; $i++) {
         if (empty($this->_columnCount[$i])) {
             $this->_columnCount[$i] = 5;
         }
     }
     $this->_loadedMappingId = $this->get('savedMapping');
     if ($this->get('showSearchForm')) {
         $this->assign('showSearchForm', TRUE);
     } else {
         $this->assign('showSearchForm', FALSE);
     }
 }
Exemplo n.º 3
0
 public function preProcess()
 {
     require_once 'CRM/Contact/BAO/SearchCustom.php';
     $csID = CRM_Utils_Request::retrieve('csid', 'Integer', $this);
     $ssID = CRM_Utils_Request::retrieve('ssID', 'Integer', $this);
     $gID = CRM_Utils_Request::retrieve('gid', 'Integer', $this);
     list($this->_customSearchID, $this->_customSearchClass, $formValues) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
     if (!$this->_customSearchID) {
         CRM_Core_Error::fatal('Could not get details for custom search.');
     }
     if (!empty($formValues)) {
         $this->_formValues = $formValues;
     }
     // set breadcrumb to return to Custom Search listings page
     $breadCrumb = array(array('title' => ts('Custom Searches'), 'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list', 'reset=1')));
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
     // use the custom selector
     require_once 'CRM/Contact/Selector/Custom.php';
     $this->_selectorName = 'CRM_Contact_Selector_Custom';
     $this->set('customSearchID', $this->_customSearchID);
     $this->set('customSearchClass', $this->_customSearchClass);
     parent::preProcess();
     // instantiate the new class
     eval('$this->_customClass = new ' . $this->_customSearchClass . '( $this->_formValues );');
 }
 /**
  * Function to actually build the form
  *
  * @return None
  * @access public
  */
 public function preProcess()
 {
     $this->set('searchFormName', 'Builder');
     $this->set('context', 'builder');
     parent::preProcess();
     //get the block count
     $this->_blockCount = $this->get('blockCount');
     if (!$this->_blockCount) {
         $this->_blockCount = 3;
     }
     //get the column count
     $this->_columnCount = array();
     $this->_columnCount = $this->get('columnCount');
     for ($i = 1; $i < $this->_blockCount; $i++) {
         if (!isset($this->_columnCount[$i]) || !$this->_columnCount[$i]) {
             $this->_columnCount[$i] = 1;
         }
     }
     $this->_loadedMappingId = $this->get('savedMapping');
     if ($this->get('showSearchForm')) {
         $this->assign('showSearchForm', TRUE);
     } else {
         $this->assign('showSearchForm', FALSE);
     }
 }
Exemplo n.º 5
0
 /**
  * processing needed for buildForm and later
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $this->set('searchFormName', 'Advanced');
     parent::preProcess();
     $openedPanes = CRM_Contact_BAO_Query::$_openedPanes;
     $openedPanes = array_merge($openedPanes, $this->_openedPanes);
     $this->assign('openedPanes', $openedPanes);
 }
Exemplo n.º 6
0
 /**
  * Function to actually build the form
  *
  * @return None
  * @access public
  */
 public function preProcess()
 {
     parent::preProcess();
     //get the block count
     $this->_blockCount = $this->get('blockCount');
     if (!$this->_blockCount) {
         $this->_blockCount = 3;
     }
     //get the column count
     $this->_columnCount = array();
     $this->_columnCount = $this->get('columnCount');
     for ($i = 1; $i < $this->_blockCount; $i++) {
         if (!isset($this->_columnCount[$i]) || !$this->_columnCount[$i]) {
             $this->_columnCount[$i] = 1;
         }
     }
     $this->_loadedMappingId = $this->get('savedMapping');
 }
Exemplo n.º 7
0
 /**
  * Processing needed for buildForm and later.
  */
 public function preProcess()
 {
     $this->set('searchFormName', 'Basic');
     parent::preProcess();
 }
Exemplo n.º 8
0
 /**
  * processing needed for buildForm and later
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
 }
Exemplo n.º 9
0
 /**
  * processing needed for buildForm and later
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $this->set('searchFormName', 'Advanced');
     parent::preProcess();
 }