<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*/
private static $financialAccount;
- /**
- * Contribution pages
- * @var array
- * @static
- */
+ /**
+ * Contribution pages
+ * @var array
+ * @static
+ */
private static $contributionPageActive = NULL;
/**
*
* Get all the financial types
*
- * @access public
*
* @param int $id
*
- * @return array - array reference of all financial types if any
+ * @return array
+ * array reference of all financial types if any
* @static
*/
public static function &financialType($id = NULL) {
*
* Get all the financial Accounts
*
- * @access public
*
* @param int $id
* @param int $financialAccountTypeId
* @param string $retrieveColumn
* @param string $key
*
- * @return array - array reference of all financial accounts if any
+ * @return array
+ * array reference of all financial accounts if any
* @static
*/
public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') {
- $condition = NUll;
+ $condition = NULL;
if ($financialAccountTypeId) {
- $condition = " financial_account_type_id = ". $financialAccountTypeId;
+ $condition = " financial_account_type_id = " . $financialAccountTypeId;
}
$cacheKey = "{$id}_{$financialAccountTypeId}_{$retrieveColumn}_{$key}";
if (!isset(self::$financialAccount[$cacheKey])) {
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
public static function flush($name = 'cache') {
- if (isset(self::$$name)) {
+ if (isset(self::$$name)) {
self::$$name = NULL;
- }
+ }
}
/**
*
* Get all the contribution pages
*
- * @param integer $id id of the contribution page
- * @param boolean $all do we want all pages or only active pages
+ * @param int $id
+ * Id of the contribution page.
+ * @param bool $all
+ * Do we want all pages or only active pages.
*
- * @access public
*
- * @return array - array reference of all contribution pages if any
+ * @return array
+ * array reference of all contribution pages if any
* @static
*/
public static function &contributionPage($id = NULL, $all = FALSE) {
*
* Get all the payment instruments
*
- * @access public
*
* @param string $columnName
*
- * @return array - array reference of all payment instruments if any
+ * @return array
+ * array reference of all payment instruments if any
* @static
*/
public static function &paymentInstrument($columnName = 'label') {
/**
* Get all the valid accepted credit cards
*
- * @access public
*
- * @return array - array reference of all payment instruments if any
+ * @return array
+ * array reference of all payment instruments if any
* @static
*/
public static function &creditCard() {
/**
* Get all premiums
*
- * @access public
*
* @param int $pageID
- * @return array - array of all Premiums if any
+ * @return array
+ * array of all Premiums if any
* @static
*/
public static function products($pageID = NULL) {
/**
* Get all the contribution statuses
*
- * @access public
*
* @param int $id
* @param string $columnName
- * @return array - array reference of all contribution statuses
+ * @return array
+ * array reference of all contribution statuses
* @static
*/
public static function &contributionStatus($id = NULL, $columnName = 'label') {
/**
* Get all the Personal campaign pages
*
- * @access public
*
* @param null $pageType
* @param int $id
*
- * @return array - array reference of all pcp if any
+ * @return array
+ * array reference of all pcp if any
* @static
*/
public static function &pcPage($pageType = NULL, $id = NULL) {
*
* The static array pcpStatus is returned
*
- * @access public
* @static
*
* @param string $column
- * @return array - array reference of all PCP activity statuses
+ * @return array
+ * array reference of all PCP activity statuses
*/
public static function &pcpStatus($column = 'label') {
if (NULL === self::$pcpStatus) {
*
* The static array $financialTypeAccount is returned
*
- * @access public
* @static
*
* @param int $financialTypeId
* @param int $relationTypeId
- * @return array - array reference of all financial accounts for a Financial type
+ * @return array
+ * array reference of all financial accounts for a Financial type
*/
public static function financialAccountType($financialTypeId, $relationTypeId = NULL) {
if (!CRM_Utils_Array::value($financialTypeId, self::$financialTypeAccount)) {
CRM_Core_PseudoConstant::populate(
self::$financialTypeAccount[$financialTypeId],
'CRM_Financial_DAO_EntityFinancialAccount',
- $all = true,
+ $all = TRUE,
$retrieve = 'financial_account_id',
$filter = NULL,
$condition,
/**
* Get all batches
*
- * @access public
*
* @param int $id
- * @return array - array reference of all batches if any
+ * @return array
+ * array reference of all batches if any
* @static
*/
public static function &batch($id = NULL) {
return self::$batch;
}
}
-