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


PHP CRM_Financial_BAO_FinancialAccount::del方法代码示例

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


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

示例1: testdel

 /**
  * Check method del()
  */
 public function testdel()
 {
     $params = array('name' => 'Donations', 'is_deductible' => 0, 'is_active' => 1);
     $ids = array();
     $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids);
     CRM_Financial_BAO_FinancialAccount::del($contributionType->id);
     $params = array('id' => $contributionType->id);
     $result = CRM_Financial_BAO_FinancialAccount::retrieve($params, $defaults);
     $this->assertEquals(empty($result), TRUE, 'Verify financial types record deletion.');
 }
开发者ID:sdekok,项目名称:civicrm-core,代码行数:13,代码来源:FinancialAccountTest.php

示例2: postProcess

 /**
  * Process the form submission.
  *
  * @return void
  */
 public function postProcess()
 {
     if ($this->_action & CRM_Core_Action::DELETE) {
         CRM_Financial_BAO_FinancialAccount::del($this->_id);
         CRM_Core_Session::setStatus(ts('Selected Financial Account has been deleted.'));
     } else {
         $ids = array();
         // store the submitted values in an array
         $params = $this->exportValues();
         if ($this->_action & CRM_Core_Action::UPDATE) {
             $ids['contributionType'] = $this->_id;
         }
         $contributionType = CRM_Financial_BAO_FinancialAccount::add($params, $ids);
         CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $contributionType->name)));
     }
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:21,代码来源:FinancialAccount.php

示例3: postProcess

 /**
  * Process the form submission.
  */
 public function postProcess()
 {
     if ($this->_action & CRM_Core_Action::DELETE) {
         CRM_Financial_BAO_FinancialAccount::del($this->_id);
         CRM_Core_Session::setStatus(ts('Selected Financial Account has been deleted.'));
     } else {
         // store the submitted values in an array
         $params = $this->exportValues();
         if ($this->_action & CRM_Core_Action::UPDATE) {
             $params['id'] = $this->_id;
         }
         $financialAccount = CRM_Financial_BAO_FinancialAccount::add($params);
         CRM_Core_Session::setStatus(ts('The Financial Account \'%1\' has been saved.', array(1 => $financialAccount->name)), ts('Saved'), 'success');
     }
 }
开发者ID:nielosz,项目名称:civicrm-core,代码行数:18,代码来源:FinancialAccount.php


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