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


PHP CRM_Member_BAO_Membership::getContributionPageId方法代码示例

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


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

示例1: listMemberships

 /**
  * Function to list memberships for the UF user
  * 
  * return null
  * @access public
  */
 function listMemberships()
 {
     $idList = array('membership_type' => 'MembershipType', 'status' => 'MembershipStatus');
     $membership = array();
     require_once "CRM/Member/BAO/Membership.php";
     $dao =& new CRM_Member_DAO_Membership();
     $dao->contact_id = $this->_contactId;
     $dao->is_test = 0;
     $dao->find();
     while ($dao->fetch()) {
         $membership[$dao->id] = array();
         CRM_Core_DAO::storeValues($dao, $membership[$dao->id]);
         foreach ($idList as $name => $file) {
             if ($membership[$dao->id][$name . '_id']) {
                 $membership[$dao->id][$name] = CRM_Core_DAO::getFieldValue("CRM_Member_DAO_{$file}", $membership[$dao->id][$name . '_id']);
             }
         }
         if ($dao->status_id) {
             $active = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipStatus', $dao->status_id, 'is_current_member');
             if ($active) {
                 $membership[$dao->id]['active'] = $active;
             }
         }
         $membership[$dao->id]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($dao->id);
     }
     $activeMembers = CRM_Member_BAO_Membership::activeMembers($membership);
     $inActiveMembers = CRM_Member_BAO_Membership::activeMembers($membership, 'inactive');
     $this->assign('activeMembers', $activeMembers);
     $this->assign('inActiveMembers', $inActiveMembers);
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:36,代码来源:UserDashboard.php

示例2: listMemberships

 /**
  * Function to list memberships for the UF user
  *
  * return null
  * @access public
  */
 function listMemberships()
 {
     $membership = array();
     $dao = new CRM_Member_DAO_Membership();
     $dao->contact_id = $this->_contactId;
     $dao->is_test = 0;
     $dao->find();
     while ($dao->fetch()) {
         $membership[$dao->id] = array();
         CRM_Core_DAO::storeValues($dao, $membership[$dao->id]);
         //get the membership status and type values.
         $statusANDType = CRM_Member_BAO_Membership::getStatusANDTypeValues($dao->id);
         foreach (array('status', 'membership_type') as $fld) {
             $membership[$dao->id][$fld] = CRM_Utils_Array::value($fld, $statusANDType[$dao->id]);
         }
         if (!empty($statusANDType[$dao->id]['is_current_member'])) {
             $membership[$dao->id]['active'] = TRUE;
         }
         $membership[$dao->id]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($dao->id);
         if (!$membership[$dao->id]['renewPageId']) {
             // Membership payment was not done via online contribution page or free membership. Check for default membership renewal page from CiviMember Settings
             $defaultRenewPageId = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MEMBER_PREFERENCES_NAME, 'default_renewal_contribution_page');
             if ($defaultRenewPageId) {
                 $membership[$dao->id]['renewPageId'] = $defaultRenewPageId;
             }
         }
     }
     $activeMembers = CRM_Member_BAO_Membership::activeMembers($membership);
     $inActiveMembers = CRM_Member_BAO_Membership::activeMembers($membership, 'inactive');
     $this->assign('activeMembers', $activeMembers);
     $this->assign('inActiveMembers', $inActiveMembers);
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:38,代码来源:UserDashboard.php

示例3: listMemberships

 /**
  * Function to list memberships for the UF user
  * 
  * return null
  * @access public
  */
 function listMemberships()
 {
     $membership = array();
     require_once "CRM/Member/BAO/Membership.php";
     $dao = new CRM_Member_DAO_Membership();
     $dao->contact_id = $this->_contactId;
     $dao->is_test = 0;
     $dao->find();
     while ($dao->fetch()) {
         $membership[$dao->id] = array();
         CRM_Core_DAO::storeValues($dao, $membership[$dao->id]);
         //get the membership status and type values.
         $statusANDType = CRM_Member_BAO_Membership::getStatusANDTypeVaues($dao->id);
         foreach (array('status', 'membership_type') as $fld) {
             $membership[$dao->id][$fld] = CRM_Utils_Array::value($fld, $statusANDType[$dao->id]);
         }
         if (CRM_Utils_Array::value('is_current_member', $statusANDType[$dao->id])) {
             $membership[$dao->id]['active'] = true;
         }
         $membership[$dao->id]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($dao->id);
     }
     $activeMembers = CRM_Member_BAO_Membership::activeMembers($membership);
     $inActiveMembers = CRM_Member_BAO_Membership::activeMembers($membership, 'inactive');
     $this->assign('activeMembers', $activeMembers);
     $this->assign('inActiveMembers', $inActiveMembers);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:32,代码来源:UserDashboard.php

示例4: listMemberships

 /**
  * List memberships for the UF user.
  *
  */
 public function listMemberships()
 {
     $membership = array();
     $dao = new CRM_Member_DAO_Membership();
     $dao->contact_id = $this->_contactId;
     $dao->is_test = 0;
     $dao->find();
     while ($dao->fetch()) {
         $membership[$dao->id] = array();
         CRM_Core_DAO::storeValues($dao, $membership[$dao->id]);
         //get the membership status and type values.
         $statusANDType = CRM_Member_BAO_Membership::getStatusANDTypeValues($dao->id);
         foreach (array('status', 'membership_type') as $fld) {
             $membership[$dao->id][$fld] = CRM_Utils_Array::value($fld, $statusANDType[$dao->id]);
         }
         if (!empty($statusANDType[$dao->id]['is_current_member'])) {
             $membership[$dao->id]['active'] = TRUE;
         }
         $membership[$dao->id]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($dao->id);
         if (!$membership[$dao->id]['renewPageId']) {
             // Membership payment was not done via online contribution page or free membership. Check for default membership renewal page from CiviMember Settings
             $defaultRenewPageId = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MEMBER_PREFERENCES_NAME, 'default_renewal_contribution_page');
             if ($defaultRenewPageId) {
                 //CRM-14831 - check if membership type is present in contrib page
                 $memBlock = CRM_Member_BAO_Membership::getMembershipBlock($defaultRenewPageId);
                 if (!empty($memBlock['membership_types'])) {
                     $memTypes = explode(',', $memBlock['membership_types']);
                     if (in_array($dao->membership_type_id, $memTypes)) {
                         $membership[$dao->id]['renewPageId'] = $defaultRenewPageId;
                     }
                 }
             } else {
                 switch ($membership[$dao->id]['membership_type_id']) {
                     case "1":
                     default:
                         $membership[$dao->id]['renewPageId'] = 2;
                         break;
                     case "10":
                         $membership[$dao->id]['renewPageId'] = 19;
                         break;
                     case "11":
                         $membership[$dao->id]['renewPageId'] = 23;
                         break;
                     case "5":
                     case "9":
                         $membership[$dao->id]['renewPageId'] = 22;
                         break;
                 }
             }
         }
     }
     $activeMembers = CRM_Member_BAO_Membership::activeMembers($membership);
     $inActiveMembers = CRM_Member_BAO_Membership::activeMembers($membership, 'inactive');
     $this->assign('activeMembers', $activeMembers);
     $this->assign('inActiveMembers', $inActiveMembers);
 }
开发者ID:BCLibCoop,项目名称:bcla-civicrm-custom-overrides,代码行数:60,代码来源:UserDashboard.php

示例5: testgetContributionPageId

 /**
  * Get the contribution.
  * page id from the membership record
  */
 public function testgetContributionPageId()
 {
     $contactId = Contact::createIndividual();
     $params = array('contact_id' => $contactId, 'membership_type_id' => $this->_membershipTypeID, 'join_date' => date('Ymd', strtotime('2006-01-21')), 'start_date' => date('Ymd', strtotime('2006-01-21')), 'end_date' => date('Ymd', strtotime('2006-12-21')), 'source' => 'Payment', 'is_override' => 1, 'status_id' => $this->_membershipStatusID);
     $ids = array();
     CRM_Member_BAO_Membership::create($params, $ids);
     $membershipId = $this->assertDBNotNull('CRM_Member_BAO_Membership', $contactId, 'id', 'contact_id', 'Database check for created membership.');
     $membership[$membershipId]['renewPageId'] = CRM_Member_BAO_Membership::getContributionPageId($membershipId);
     $this->membershipDelete($membershipId);
     Contact::delete($contactId);
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:15,代码来源:MembershipTest.php


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