本文整理汇总了PHP中CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions方法的具体用法?PHP CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions怎么用?PHP CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Pledge_BAO_Pledge
的用法示例。
在下文中一共展示了CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
/**
* Set variables up before form is built.
*/
public function preProcess()
{
$this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
// check for action permissions.
if (!CRM_Core_Permission::checkActionPermission('CiviPledge', $this->_action)) {
CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
$this->assign('action', $this->_action);
$this->assign('context', $this->_context);
if ($this->_action & CRM_Core_Action::DELETE) {
return;
}
$this->userDisplayName = $this->userEmail = NULL;
if ($this->_contactID) {
list($this->userDisplayName, $this->userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($this->_contactID);
$this->assign('displayName', $this->userDisplayName);
}
$this->setPageTitle(ts('Pledge'));
// build custom data
CRM_Custom_Form_CustomData::preProcess($this, NULL, NULL, 1, 'Pledge', $this->_id);
$this->_values = array();
// current pledge id
if ($this->_id) {
// get the contribution id
$this->_contributionID = CRM_Core_DAO::getFieldValue('CRM_Pledge_DAO_PledgePayment', $this->_id, 'contribution_id', 'pledge_id');
$params = array('id' => $this->_id);
CRM_Pledge_BAO_Pledge::getValues($params, $this->_values);
$this->_isPending = CRM_Pledge_BAO_Pledge::pledgeHasFinancialTransactions($this->_id, CRM_Utils_Array::value('status_id', $this->_values)) ? FALSE : TRUE;
}
// get the pledge frequency units.
$this->_freqUnits = CRM_Core_OptionGroup::values('recur_frequency_units');
$this->_fromEmails = CRM_Core_BAO_Email::getFromEmail();
}