當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Core_DAO_UFJoin::delete方法代碼示例

本文整理匯總了PHP中CRM_Core_DAO_UFJoin::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_DAO_UFJoin::delete方法的具體用法?PHP CRM_Core_DAO_UFJoin::delete怎麽用?PHP CRM_Core_DAO_UFJoin::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Core_DAO_UFJoin的用法示例。


在下文中一共展示了CRM_Core_DAO_UFJoin::delete方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteAll

 /**
  * @param array $params
  */
 public static function deleteAll(&$params)
 {
     $module = CRM_Utils_Array::value('module', $params);
     $entityTable = CRM_Utils_Array::value('entity_table', $params);
     $entityID = CRM_Utils_Array::value('entity_id', $params);
     if (empty($entityTable) || empty($entityID) || empty($module)) {
         return;
     }
     $dao = new CRM_Core_DAO_UFJoin();
     $dao->module = $module;
     $dao->entity_table = $entityTable;
     $dao->entity_id = $entityID;
     $dao->delete();
 }
開發者ID:kidaa30,項目名稱:yes,代碼行數:17,代碼來源:UFJoin.php

示例2: 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

示例3: 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

示例4: delUFJoin

 /**
  * Delete the uf join record for an uf group.
  *
  * @param array $params
  *   (reference) an assoc array of name/value pairs.
  */
 public static function delUFJoin(&$params)
 {
     $ufJoin = new CRM_Core_DAO_UFJoin();
     $ufJoin->copyValues($params);
     $ufJoin->delete();
 }
開發者ID:rollox,項目名稱:civicrm-core,代碼行數:12,代碼來源:UFGroup.php

示例5: delUFJoin

 /**
  * Function to delete the uf join record for an uf group 
  *
  * @param array  $params    (reference) an assoc array of name/value pairs
  *
  * @return void
  * @access public
  * @static
  */
 static function delUFJoin(&$params)
 {
     require_once 'CRM/Core/DAO/UFJoin.php';
     $ufJoin = new CRM_Core_DAO_UFJoin();
     $ufJoin->copyValues($params);
     $ufJoin->delete();
 }
開發者ID:hampelm,項目名稱:Ginsberg-CiviDemo,代碼行數:16,代碼來源:UFGroup.php


注:本文中的CRM_Core_DAO_UFJoin::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。