当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_BAO_UFField::getContribBatchEntryFields方法代码示例

本文整理汇总了PHP中CRM_Core_BAO_UFField::getContribBatchEntryFields方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_UFField::getContribBatchEntryFields方法的具体用法?PHP CRM_Core_BAO_UFField::getContribBatchEntryFields怎么用?PHP CRM_Core_BAO_UFField::getContribBatchEntryFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_BAO_UFField的用法示例。


在下文中一共展示了CRM_Core_BAO_UFField::getContribBatchEntryFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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);
     }
 }
开发者ID:kidaa30,项目名称:yes,代码行数:67,代码来源:Field.php


注:本文中的CRM_Core_BAO_UFField::getContribBatchEntryFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。