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


PHP CRM_Price_BAO_PriceFieldValue::updateFinancialType方法代码示例

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


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

示例1: CRM_Contribute_DAO_ContributionPage

 /**
  * takes an associative array and creates a contribution page object
  *
  * @param array $params (reference ) an assoc array of name/value pairs
  *
  * @return object CRM_Contribute_DAO_ContributionPage object
  * @access public
  * @static
  */
 public static function &create(&$params)
 {
     $financialTypeId = NULL;
     if (!empty($params['id']) && !CRM_Price_BAO_PriceSet::getFor('civicrm_contribution_page', $params['id'], NULL, 1)) {
         $financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $params['id'], 'financial_type_id');
     }
     $dao = new CRM_Contribute_DAO_ContributionPage();
     $dao->copyValues($params);
     $dao->save();
     if ($financialTypeId && !empty($params['financial_type_id']) && $financialTypeId != $params['financial_type_id']) {
         CRM_Price_BAO_PriceFieldValue::updateFinancialType($params['id'], 'civicrm_contribution_page', $params['financial_type_id']);
     }
     return $dao;
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:23,代码来源:ContributionPage.php

示例2: empty

 /**
  * Takes an associative array and creates a contribution page object.
  *
  * @param array $params
  *   (reference ) an assoc array of name/value pairs.
  *
  * @return CRM_Contribute_DAO_ContributionPage
  */
 public static function &create(&$params)
 {
     $financialTypeId = NULL;
     if (!empty($params['id']) && !CRM_Price_BAO_PriceSet::getFor('civicrm_contribution_page', $params['id'], NULL, 1)) {
         $financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $params['id'], 'financial_type_id');
     }
     $hook = empty($params['id']) ? 'create' : 'edit';
     CRM_Utils_Hook::pre($hook, 'ContributionPage', CRM_Utils_Array::value('id', $params), $params);
     $dao = new CRM_Contribute_DAO_ContributionPage();
     $dao->copyValues($params);
     $dao->save();
     if ($financialTypeId && !empty($params['financial_type_id']) && $financialTypeId != $params['financial_type_id']) {
         CRM_Price_BAO_PriceFieldValue::updateFinancialType($params['id'], 'civicrm_contribution_page', $params['financial_type_id']);
     }
     CRM_Utils_Hook::post($hook, 'ContributionPage', $dao->id, $dao);
     return $dao;
 }
开发者ID:JSProffitt,项目名称:civicrm-website-org,代码行数:25,代码来源:ContributionPage.php

示例3: add

 /**
  * function to add the event
  *
  * @param array $params reference array contains the values submitted by the form
  *
  * @access public
  * @static
  *
  * @return object
  */
 static function add(&$params)
 {
     CRM_Utils_System::flushCache();
     $financialTypeId = NULL;
     if (!empty($params['id'])) {
         CRM_Utils_Hook::pre('edit', 'Event', $params['id'], $params);
         if (empty($params['skipFinancialType'])) {
             $financialTypeId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $params['id'], 'financial_type_id');
         }
     } else {
         CRM_Utils_Hook::pre('create', 'Event', NULL, $params);
     }
     $event = new CRM_Event_DAO_Event();
     $event->copyValues($params);
     $result = $event->save();
     if (!empty($params['id'])) {
         CRM_Utils_Hook::post('edit', 'Event', $event->id, $event);
     } else {
         CRM_Utils_Hook::post('create', 'Event', $event->id, $event);
     }
     if ($financialTypeId && !empty($params['financial_type_id']) && $financialTypeId != $params['financial_type_id']) {
         CRM_Price_BAO_PriceFieldValue::updateFinancialType($params['id'], 'civicrm_event', $params['financial_type_id']);
     }
     return $result;
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:35,代码来源:Event.php


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