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


PHP CRM_Member_DAO_MembershipBlock::delete方法代码示例

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


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

示例1: deleteMembershipBlock

 /**
  * Helper function to delete the membership block.
  * @param $blcokId
  */
 public function deleteMembershipBlock($blcokId)
 {
     $dao = new CRM_Member_DAO_MembershipBlock();
     $dao->id = $blcokId;
     if ($dao->find(TRUE)) {
         $dao->delete();
     }
 }
开发者ID:konadave,项目名称:civicrm-core,代码行数:12,代码来源:Membership.php

示例2: del

 /**
  * Function to delete membership Blocks
  *
  * @param int $id
  * @static
  */
 static function del($id)
 {
     $dao = new CRM_Member_DAO_MembershipBlock();
     $dao->id = $id;
     $result = FALSE;
     if ($dao->find(TRUE)) {
         $dao->delete();
         $result = TRUE;
     }
     return $result;
 }
开发者ID:hguru,项目名称:224Civi,代码行数:17,代码来源:MembershipBlock.php

示例3: postProcess

 /**
  * Process the form when submitted
  *
  * @return void
  * @access public
  */
 public function postProcess()
 {
     require_once 'CRM/Core/Transaction.php';
     $transaction = new CRM_Core_Transaction();
     // first delete the join entries associated with this contribution page
     require_once 'CRM/Core/DAO/UFJoin.php';
     $dao = new CRM_Core_DAO_UFJoin();
     $params = array('entity_table' => 'civicrm_contribution_page', 'entity_id' => $this->_id);
     $dao->copyValues($params);
     $dao->delete();
     require_once 'CRM/Core/OptionGroup.php';
     $groupName = "civicrm_contribution_page.amount.{$this->_id}";
     CRM_Core_OptionGroup::deleteAssoc($groupName);
     //next delete the membership block fields
     require_once 'CRM/Member/DAO/MembershipBlock.php';
     $dao = new CRM_Member_DAO_MembershipBlock();
     $dao->entity_table = 'civicrm_contribution_page';
     $dao->entity_id = $this->_id;
     $dao->delete();
     //next delete the pcp block fields
     require_once 'CRM/Contribute/DAO/PCPBlock.php';
     $dao = new CRM_Contribute_DAO_PCPBlock();
     $dao->entity_table = 'civicrm_contribution_page';
     $dao->entity_id = $this->_id;
     $dao->delete();
     // need to delete premiums. CRM-4586
     require_once 'CRM/Contribute/BAO/Premium.php';
     CRM_Contribute_BAO_Premium::deletePremium($this->_id);
     // price set cleanup, CRM-5527
     require_once 'CRM/Price/BAO/Set.php';
     CRM_Price_BAO_Set::removeFrom('civicrm_contribution_page', $this->_id);
     // finally delete the contribution page
     require_once 'CRM/Contribute/DAO/ContributionPage.php';
     $dao = new CRM_Contribute_DAO_ContributionPage();
     $dao->id = $this->_id;
     $dao->delete();
     $transaction->commit();
     CRM_Core_Session::setStatus(ts('The contribution page \'%1\' has been deleted.', array(1 => $this->_title)));
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:45,代码来源:Delete.php

示例4: postProcess

 /**
  * Process the form when submitted
  *
  * @return void
  * @access public
  */
 public function postProcess()
 {
     $transaction = new CRM_Core_Transaction();
     // first delete the join entries associated with this contribution page
     $dao = new CRM_Core_DAO_UFJoin();
     $params = array('entity_table' => 'civicrm_contribution_page', 'entity_id' => $this->_id);
     $dao->copyValues($params);
     $dao->delete();
     //next delete the membership block fields
     $dao = new CRM_Member_DAO_MembershipBlock();
     $dao->entity_table = 'civicrm_contribution_page';
     $dao->entity_id = $this->_id;
     $dao->delete();
     //next delete the pcp block fields
     $dao = new CRM_PCP_DAO_PCPBlock();
     $dao->entity_table = 'civicrm_contribution_page';
     $dao->entity_id = $this->_id;
     $dao->delete();
     // need to delete premiums. CRM-4586
     CRM_Contribute_BAO_Premium::deletePremium($this->_id);
     // price set cleanup, CRM-5527
     CRM_Price_BAO_PriceSet::removeFrom('civicrm_contribution_page', $this->_id);
     // finally delete the contribution page
     $dao = new CRM_Contribute_DAO_ContributionPage();
     $dao->id = $this->_id;
     $dao->delete();
     $transaction->commit();
     CRM_Core_Session::setStatus(ts("The contribution page '%1' has been deleted.", array(1 => $this->_title)), ts('Deleted'), 'success');
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:35,代码来源:Delete.php


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