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


PHP CRM_Member_BAO_Membership::copyValues方法代码示例

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


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

示例1: array

 /**
  * Fetch the object and store the values in the values array.
  *
  * @param array $params
  *   Input parameters to find object.
  * @param array $values
  *   Output values of the object.
  * @param bool $active
  *   Do you want only active memberships to.
  *                        be returned
  * @param bool $relatedMemberships
  *
  * @return CRM_Member_BAO_Membership|null
  *   The found object or null
  */
 public static function &getValues(&$params, &$values, $active = FALSE, $relatedMemberships = FALSE)
 {
     if (empty($params)) {
         return NULL;
     }
     $membership = new CRM_Member_BAO_Membership();
     $membership->copyValues($params);
     $membership->find();
     $memberships = array();
     while ($membership->fetch()) {
         if ($active && !CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipStatus', $membership->status_id, 'is_current_member')) {
             continue;
         }
         CRM_Core_DAO::storeValues($membership, $values[$membership->id]);
         $memberships[$membership->id] = $membership;
         if ($relatedMemberships && !empty($membership->owner_membership_id)) {
             $values['owner_membership_ids'][] = $membership->owner_membership_id;
         }
     }
     return $memberships;
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:36,代码来源:Membership.php

示例2: array

 /**
  * Given the list of params in the params array, fetch the object
  * and store the values in the values array
  *
  * @param array   $params input parameters to find object
  * @param array   $values output values of the object
  * @param boolean $active do you want only active memberships to
  *                        be returned
  * 
  * @return CRM_Member_BAO_Membership|null the found object or null
  * @access public
  * @static
  */
 static function &getValues(&$params, &$values, $active = false)
 {
     if (empty($params)) {
         return null;
     }
     $membership = new CRM_Member_BAO_Membership();
     $membership->copyValues($params);
     $membership->find();
     $memberships = array();
     while ($membership->fetch()) {
         if ($active && !CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipStatus', $membership->status_id, 'is_current_member')) {
             continue;
         }
         CRM_Core_DAO::storeValues($membership, $values[$membership->id]);
         $memberships[$membership->id] = $membership;
     }
     return $memberships;
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:31,代码来源:Membership.php


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