本文整理汇总了PHP中CRM_Contact_Form_Search::_selectorName方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contact_Form_Search::_selectorName方法的具体用法?PHP CRM_Contact_Form_Search::_selectorName怎么用?PHP CRM_Contact_Form_Search::_selectorName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Contact_Form_Search
的用法示例。
在下文中一共展示了CRM_Contact_Form_Search::_selectorName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
/**
* Processing needed for buildForm and later.
*/
public function preProcess()
{
// set the various class variables
$this->_group = CRM_Core_PseudoConstant::group();
$this->_groupIterator = CRM_Core_PseudoConstant::groupIterator();
$this->_tag = CRM_Core_BAO_Tag::getTags();
$this->_done = FALSE;
/*
* we allow the controller to set force/reset externally, useful when we are being
* driven by the wizard framework
*/
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_groupID = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
$this->_amtgID = CRM_Utils_Request::retrieve('amtgID', 'Positive', $this);
$this->_ssID = CRM_Utils_Request::retrieve('ssID', 'Positive', $this);
$this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter', 'String', $this);
$this->_ufGroupID = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$this->_componentMode = CRM_Utils_Request::retrieve('component_mode', 'Positive', $this, FALSE, 1, $_REQUEST);
$this->_operator = CRM_Utils_Request::retrieve('operator', 'String', $this, FALSE, 1, $_REQUEST, 'AND');
/**
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->assign('actionButtonName', $this->_actionButtonName);
// reset from session, CRM-3526
$session = CRM_Core_Session::singleton();
if ($this->_force && $session->get('selectedSearchContactIds')) {
$session->resetScope('selectedSearchContactIds');
}
// if we dont get this from the url, use default if one exsts
$config = CRM_Core_Config::singleton();
if ($this->_ufGroupID == NULL && $config->defaultSearchProfileID != NULL) {
$this->_ufGroupID = $config->defaultSearchProfileID;
}
// assign context to drive the template display, make sure context is valid
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'search');
if (!CRM_Utils_Array::value($this->_context, self::validContext())) {
$this->_context = 'search';
}
$this->set('context', $this->_context);
$this->assign('context', $this->_context);
$this->_modeValue = self::getModeValue($this->_componentMode);
$this->assign($this->_modeValue);
$this->set('selectorName', self::$_selectorName);
// get user submitted values
// get it from controller only if form has been submitted, else preProcess has set this
// $this->controller->isModal( ) returns TRUE if page is
// valid, i.e all the validations are TRUE
if (!empty($_POST) && !$this->controller->isModal()) {
$this->_formValues = $this->controller->exportValues($this->_name);
$this->normalizeFormValues();
$this->_params = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
$this->_returnProperties =& $this->returnProperties();
// also get the uf group id directly from the post value
$this->_ufGroupID = CRM_Utils_Array::value('uf_group_id', $_POST, $this->_ufGroupID);
$this->_formValues['uf_group_id'] = $this->_ufGroupID;
$this->set('id', $this->_ufGroupID);
// also get the object mode directly from the post value
$this->_componentMode = CRM_Utils_Array::value('component_mode', $_POST, $this->_componentMode);
// also get the operator from the post value if set
$this->_operator = CRM_Utils_Array::value('operator', $_POST, $this->_operator);
$this->_formValues['operator'] = $this->_operator;
$this->set('operator', $this->_operator);
} else {
$this->_formValues = $this->get('formValues');
$this->_params = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
$this->_returnProperties =& $this->returnProperties();
if (!empty($this->_ufGroupID)) {
$this->set('id', $this->_ufGroupID);
}
}
if (empty($this->_formValues)) {
//check if group is a smart group (fix for CRM-1255)
if ($this->_groupID) {
if ($ssId = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group', $this->_groupID, 'saved_search_id')) {
$this->_ssID = $ssId;
}
}
// fix for CRM-1907
if (isset($this->_ssID) && $this->_context != 'smog') {
// we only retrieve the saved search values if out current values are null
$this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID);
//fix for CRM-1505
if (CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $this->_ssID, 'mapping_id')) {
$this->_params = CRM_Contact_BAO_SavedSearch::getSearchParams($this->_ssID);
} else {
$this->_params = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
}
$this->_returnProperties =& $this->returnProperties();
} else {
if (isset($this->_ufGroupID)) {
// also set the uf group id if not already present
$this->_formValues['uf_group_id'] = $this->_ufGroupID;
}
if (isset($this->_componentMode)) {
//.........这里部分代码省略.........