本文整理汇总了PHP中CRM_Contact_Form_Search::preProcess方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contact_Form_Search::preProcess方法的具体用法?PHP CRM_Contact_Form_Search::preProcess怎么用?PHP CRM_Contact_Form_Search::preProcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Contact_Form_Search
的用法示例。
在下文中一共展示了CRM_Contact_Form_Search::preProcess方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
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();
}
}
示例2: preProcess
/**
* 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);
}
}
示例3: preProcess
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 );');
}
示例4: preProcess
/**
* 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);
}
}
示例5: preProcess
/**
* 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);
}
示例6: preProcess
/**
* 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');
}
示例7: preProcess
/**
* Processing needed for buildForm and later.
*/
public function preProcess()
{
$this->set('searchFormName', 'Basic');
parent::preProcess();
}
示例8: preProcess
/**
* processing needed for buildForm and later
*
* @return void
* @access public
*/
function preProcess()
{
parent::preProcess();
}
示例9: preProcess
/**
* processing needed for buildForm and later
*
* @return void
* @access public
*/
function preProcess()
{
$this->set('searchFormName', 'Advanced');
parent::preProcess();
}