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


PHP CRM_Core_BAO_CustomGroup::buildViewHTML方法代码示例

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


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

示例1: preProcess

 /**  
  * Function to set variables up before form is built  
  *                                                            
  * @return void  
  * @access public  
  */
 function preProcess()
 {
     require_once 'CRM/Contribute/BAO/Contribution.php';
     $values = array();
     $ids = array();
     $params = array('id' => $this->get('id'));
     CRM_Contribute_BAO_Contribution::getValues($params, $values, $ids);
     CRM_Contribute_BAO_Contribution::resolveDefaults($values);
     $groupTree =& CRM_Core_BAO_CustomGroup::getTree('Contribution', $this->get('id'));
     CRM_Core_BAO_CustomGroup::buildViewHTML($this, $groupTree);
     $id = $this->get('id');
     if ($id) {
         require_once 'CRM/Contribute/DAO/ContributionProduct.php';
         $dao =& new CRM_Contribute_DAO_ContributionProduct();
         $dao->contribution_id = $id;
         if ($dao->find(true)) {
             $premiumId = $dao->id;
             $productID = $dao->product_id;
         }
     }
     if ($premiumId) {
         require_once 'CRM/Contribute/DAO/Product.php';
         $productDAO =& new CRM_Contribute_DAO_Product();
         $productDAO->id = $productID;
         $productDAO->find(true);
         $this->assign('premium', $productDAO->name);
         $this->assign('option', $dao->product_option);
         $this->assign('fulfilled', $dao->fulfilled_date);
     }
     $this->assign($values);
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:37,代码来源:ContributionView.php

示例2: preProcess

 /** 
  * Heart of the viewing process. The runner gets all the meta data for 
  * the contact and calls the appropriate type of page to view. 
  * 
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     parent::preProcess();
     //Custom Groups Inline
     $entityType = CRM_Contact_BAO_Contact::getContactType($this->_contactId);
     $groupTree =& CRM_Core_BAO_CustomGroup::getTree($entityType, $this->_contactId);
     CRM_Core_BAO_CustomGroup::buildViewHTML($this, $groupTree);
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:16,代码来源:Basic.php

示例3: buildQuickForm

 /**
  * Function to build the form
  *
  * @return None
  * @access public
  */
 function buildQuickForm()
 {
     parent::buildQuickForm();
     if ($this->_action & CRM_CORE_ACTION_DELETE) {
         return;
     }
     $activityType = CRM_Core_PseudoConstant::activityType(false);
     $this->applyFilter('__ALL__', 'trim');
     $this->add('select', 'activity_type_id', ts('Activity Type'), array('' => ts('- select activity type -')) + $activityType, array('onChange' => 'activity_get_description( )'), true);
     $this->addRule('activity_type_id', ts('Select a valid activity.'), 'required');
     $this->add('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_ActivityType', 'description'), false);
     $this->add('text', 'subject', ts('Subject'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'subject'), true);
     $this->add('date', 'scheduled_date_time', ts('Date and Time'), CRM_Core_SelectValues::date('datetime'), true);
     $this->addRule('scheduled_date_time', ts('Select a valid date.'), 'qfDate');
     $this->add('select', 'duration_hours', ts('Duration'), CRM_Core_SelectValues::getHours());
     $this->add('select', 'duration_minutes', null, CRM_Core_SelectValues::getMinutes());
     $this->add('text', 'location', ts('Location'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'location'));
     $this->add('textarea', 'details', ts('Details'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Activity', 'details'));
     $this->add('select', 'status', ts('Status'), CRM_Core_SelectValues::activityStatus(), true);
     $this->_groupTree =& CRM_Core_BAO_CustomGroup::getTree('Activity', $this->_id, 0);
     if ($this->_action & CRM_CORE_ACTION_VIEW) {
         CRM_Core_BAO_CustomGroup::buildViewHTML($this, $this->_groupTree);
     } else {
         CRM_Core_BAO_CustomGroup::buildQuickForm($this, $this->_groupTree, 'showBlocks1', 'hideBlocks1');
     }
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:32,代码来源:OtherActivity.php


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