本文整理汇总了PHP中CRM_Core_BAO_UFField::checkSearchableORInSelector方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_UFField::checkSearchableORInSelector方法的具体用法?PHP CRM_Core_BAO_UFField::checkSearchableORInSelector怎么用?PHP CRM_Core_BAO_UFField::checkSearchableORInSelector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_UFField
的用法示例。
在下文中一共展示了CRM_Core_BAO_UFField::checkSearchableORInSelector方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
public function preProcess()
{
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$showBestResult = CRM_Utils_Request::retrieve('sbr', 'Positive', CRM_Core_DAO::$_nullArray);
if ($showBestResult) {
$this->assign('showBestResult', $showBestResult);
}
$this->_fields =& CRM_Contact_BAO_Contact::importableFields('All', true, true, true);
if (CRM_Core_Permission::access('CiviContribute')) {
require_once "CRM/Contribute/BAO/Contribution.php";
$this->_fields = array_merge(CRM_Contribute_BAO_Contribution::getContributionFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviMember')) {
require_once 'CRM/Member/BAO/Membership.php';
$this->_fields = array_merge(CRM_Member_BAO_Membership::getMembershipFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviEvent')) {
require_once 'CRM/Event/BAO/Query.php';
$this->_fields = array_merge(CRM_Event_BAO_Query::getParticipantFields(true), $this->_fields);
}
if (CRM_Core_Permission::access('Quest')) {
require_once 'CRM/Quest/BAO/Student.php';
$this->_fields = array_merge(CRM_Quest_BAO_Student::exportableFields(), $this->_fields);
}
$this->_selectFields = array();
foreach ($this->_fields as $name => $field) {
// lets skip note for now since we dont support it
if ($name == 'note') {
continue;
}
$this->_selectFields[$name] = $field['title'];
$this->_hasLocationTypes[$name] = CRM_Utils_Array::value('hasLocationType', $field);
}
// lets add group and tag to this list
$this->_selectFields['group'] = ts('Group(s)');
$this->_selectFields['tag'] = ts('Tag(s)');
//CRM-4363 check for in selector or searchable fields.
$this->_hasSearchableORInSelector = CRM_Core_BAO_UFField::checkSearchableORInSelector($this->_gid);
$this->assign('fieldId', $this->_id);
}
示例2: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
public function preProcess()
{
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
if ($this->_gid) {
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
CRM_Utils_System::setTitle($this->_title . ' - ' . ts('CiviCRM Profile Fields'));
$url = CRM_Utils_System::url('civicrm/admin/uf/group/field', "reset=1&action=browse&gid={$this->_gid}");
$session = CRM_Core_Session::singleton();
$session->pushUserContext($url);
}
$showBestResult = CRM_Utils_Request::retrieve('sbr', 'Positive', CRM_Core_DAO::$_nullArray);
if ($showBestResult) {
$this->assign('showBestResult', $showBestResult);
}
$this->_fields =& CRM_Contact_BAO_Contact::importableFields('All', true, true, true);
$this->_fields = array_merge(CRM_Activity_BAO_Activity::exportableFields('Activity'), $this->_fields);
if (CRM_Core_Permission::access('CiviContribute')) {
require_once "CRM/Contribute/BAO/Contribution.php";
$this->_fields = array_merge(CRM_Contribute_BAO_Contribution::getContributionFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviMember')) {
require_once 'CRM/Member/BAO/Membership.php';
$this->_fields = array_merge(CRM_Member_BAO_Membership::getMembershipFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviEvent')) {
require_once 'CRM/Event/BAO/Query.php';
$this->_fields = array_merge(CRM_Event_BAO_Query::getParticipantFields(true), $this->_fields);
}
if (CRM_Core_Permission::access('Quest')) {
require_once 'CRM/Quest/BAO/Student.php';
$this->_fields = array_merge(CRM_Quest_BAO_Student::exportableFields(), $this->_fields);
}
$this->_selectFields = array();
foreach ($this->_fields as $name => $field) {
// lets skip note for now since we dont support it
if ($name == 'note') {
continue;
}
$this->_selectFields[$name] = $field['title'];
$this->_hasLocationTypes[$name] = CRM_Utils_Array::value('hasLocationType', $field);
}
// lets add group and tag to this list
$this->_selectFields['group'] = ts('Group(s)');
$this->_selectFields['tag'] = ts('Tag(s)');
//CRM-4363 check for in selector or searchable fields.
$this->_hasSearchableORInSelector = CRM_Core_BAO_UFField::checkSearchableORInSelector($this->_gid);
$this->assign('fieldId', $this->_id);
if ($this->_id) {
require_once 'CRM/Core/DAO.php';
$fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $this->_id, 'label');
$this->assign('fieldTitle', $fieldTitle);
}
}
示例3: preProcess
/**
* Set variables up before form is built.
*
* @return void
*/
public function preProcess()
{
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
if ($this->_gid) {
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
$this->setPageTitle(ts('Profile Field'));
$url = CRM_Utils_System::url('civicrm/admin/uf/group/field', "reset=1&action=browse&gid={$this->_gid}");
$session = CRM_Core_Session::singleton();
$session->pushUserContext($url);
$breadCrumb = array(array('title' => ts('CiviCRM Profile Fields'), 'url' => $url));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
$showBestResult = CRM_Utils_Request::retrieve('sbr', 'Positive', CRM_Core_DAO::$_nullArray);
if ($showBestResult) {
$this->assign('showBestResult', $showBestResult);
}
$this->_fields = CRM_Contact_BAO_Contact::importableFields('All', TRUE, TRUE, TRUE, TRUE, TRUE);
$this->_fields = array_merge(CRM_Activity_BAO_Activity::exportableFields('Activity'), $this->_fields);
//unset campaign related fields.
if (isset($this->_fields['activity_campaign_id'])) {
$this->_fields['activity_campaign_id']['title'] = ts('Campaign');
if (isset($this->_fields['activity_campaign'])) {
unset($this->_fields['activity_campaign']);
}
}
if (CRM_Core_Permission::access('CiviContribute')) {
$this->_fields = array_merge(CRM_Contribute_BAO_Contribution::getContributionFields(FALSE), $this->_fields);
$this->_fields = array_merge(CRM_Core_BAO_UFField::getContribBatchEntryFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviMember')) {
$this->_fields = array_merge(CRM_Member_BAO_Membership::getMembershipFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviEvent')) {
$this->_fields = array_merge(CRM_Event_BAO_Query::getParticipantFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviCase')) {
$this->_fields = array_merge(CRM_Case_BAO_Query::getFields(), $this->_fields);
}
$this->_fields = array_merge($this->_fields, CRM_Contact_BAO_Query_Hook::singleton()->getFields());
$this->_selectFields = array();
foreach ($this->_fields as $name => $field) {
// lets skip note for now since we dont support it
if ($name == 'note') {
continue;
}
$this->_selectFields[$name] = $field['title'];
$this->_hasLocationTypes[$name] = CRM_Utils_Array::value('hasLocationType', $field);
}
// lets add group, tag and current_employer to this list
$this->_selectFields['group'] = ts('Group(s)');
$this->_selectFields['tag'] = ts('Tag(s)');
$this->_selectFields['current_employer'] = ts('Current Employer');
$this->_selectFields['phone_and_ext'] = ts('Phone and Extension');
//CRM-4363 check for in selector or searchable fields.
$this->_hasSearchableORInSelector = CRM_Core_BAO_UFField::checkSearchableORInSelector($this->_gid);
$this->assign('fieldId', $this->_id);
if ($this->_id) {
$fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $this->_id, 'label');
$this->assign('fieldTitle', $fieldTitle);
}
}
示例4: preProcess
/**
* Function to set variables up before form is built
*
* @return void
* @access public
*/
public function preProcess()
{
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
if ($this->_gid) {
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'title');
CRM_Utils_System::setTitle($this->_title . ' - ' . ts('CiviCRM Profile Fields'));
$url = CRM_Utils_System::url('civicrm/admin/uf/group/field', "reset=1&action=browse&gid={$this->_gid}");
$session = CRM_Core_Session::singleton();
$session->pushUserContext($url);
$breadCrumb = array(array('title' => ts('CiviCRM Profile Fields'), 'url' => $url));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
$showBestResult = CRM_Utils_Request::retrieve('sbr', 'Positive', CRM_Core_DAO::$_nullArray);
if ($showBestResult) {
$this->assign('showBestResult', $showBestResult);
}
$this->_fields = CRM_Contact_BAO_Contact::importableFields('All', TRUE, TRUE, TRUE);
$this->_fields = array_merge(CRM_Activity_BAO_Activity::exportableFields('Activity'), $this->_fields);
$this->_contriBatchEntryFields = array('send_receipt' => array('name' => 'send_receipt', 'title' => ts('Send Receipt')), 'soft_credit' => array('name' => 'soft_credit', 'title' => ts('Soft Credit')), 'product_name' => array('name' => 'product_name', 'title' => ts('Premiums')), 'contribution_note' => array('name' => 'contribution_note', 'title' => ts('Contribution Note')));
$this->_memberBatchEntryFields = array('send_receipt' => array('name' => 'send_receipt', 'title' => ts('Send Receipt')), 'soft_credit' => array('name' => 'soft_credit', 'title' => ts('Soft Credit')), 'product_name' => array('name' => 'product_name', 'title' => ts('Premiums')), 'contribution_type' => array('name' => 'contribution_type', 'title' => ts('Contribution Type')), 'total_amount' => array('name' => 'total_amount', 'title' => ts('Total Amount')), 'receive_date' => array('name' => 'receive_date', 'title' => ts('Receive Date')), 'payment_instrument' => array('name' => 'payment_instrument', 'title' => ts('Payment Instrument')), 'contribution_status_id' => array('name' => 'contribution_status_id', 'title' => ts('Contribution Status')));
//unset campaign related fields.
if (isset($this->_fields['activity_campaign_id'])) {
$this->_fields['activity_campaign_id']['title'] = ts('Campaign');
if (isset($this->_fields['activity_campaign'])) {
unset($this->_fields['activity_campaign']);
}
}
if (CRM_Core_Permission::access('CiviContribute')) {
$this->_fields = array_merge(CRM_Contribute_BAO_Contribution::getContributionFields(FALSE), $this->_fields);
$this->_fields = array_merge($this->_contriBatchEntryFields, $this->_fields);
}
if (CRM_Core_Permission::access('CiviMember')) {
$this->_fields = array_merge(CRM_Member_BAO_Membership::getMembershipFields(), $this->_fields);
}
if (CRM_Core_Permission::access('CiviEvent')) {
$this->_fields = array_merge(CRM_Event_BAO_Query::getParticipantFields(TRUE), $this->_fields);
}
if (CRM_Core_Permission::access('Quest')) {
$this->_fields = array_merge(CRM_Quest_BAO_Student::exportableFields(), $this->_fields);
}
$this->_selectFields = array();
foreach ($this->_fields as $name => $field) {
// lets skip note for now since we dont support it
if ($name == 'note') {
continue;
}
$this->_selectFields[$name] = $field['title'];
$this->_hasLocationTypes[$name] = CRM_Utils_Array::value('hasLocationType', $field);
}
// lets add group, tag and current_employer to this list
$this->_selectFields['group'] = ts('Group(s)');
$this->_selectFields['tag'] = ts('Tag(s)');
$this->_selectFields['current_employer'] = ts('Current Employer');
//CRM-4363 check for in selector or searchable fields.
$this->_hasSearchableORInSelector = CRM_Core_BAO_UFField::checkSearchableORInSelector($this->_gid);
$this->assign('fieldId', $this->_id);
if ($this->_id) {
$fieldTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $this->_id, 'label');
$this->assign('fieldTitle', $fieldTitle);
}
}