+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +------- -------------------------------------------------------------+
-*/
+ +--------------------------------------------------------------------+
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
/**
* Financial types
* @var array
- * @static
*/
private static $financialType;
/**
* Financial types
* @var array
- * @static
*/
private static $financialTypeAccount;
/**
* Financial types
* @var array
- * @static
*/
private static $financialAccount;
/**
- * Contribution pages
- * @var array
- * @static
- */
+ * Contribution pages
+ * @var array
+ */
private static $contributionPageActive = NULL;
/**
* Contribution pages
* @var array
- * @static
*/
private static $contributionPageAll = NULL;
* Payment instruments
*
* @var array
- * @static
*/
private static $paymentInstrument;
* Contribution status
*
* @var array
- * @static
*/
private static $contributionStatus;
/**
* Personal campaign pages
* @var array
- * @static
*/
private static $pcPage;
/**
* Status of personal campaign page
* @var array
- * @static
*/
private static $pcpStatus;
/**
* Contribution / financial batches
* @var array
- * @static
*/
private static $batch;
*
* @param int $id
*
- * @return array - array reference of all financial types if any
- * @static
+ * @return array
+ * array reference of all financial types if any
*/
public static function &financialType($id = NULL) {
if (!self::$financialType) {
* @param string $retrieveColumn
* @param string $key
*
- * @return array - array reference of all financial accounts if any
- * @static
+ * @return array
+ * array reference of all financial accounts if any
*/
public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') {
$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.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
public static function flush($name = 'cache') {
if (isset(self::$$name)) {
self::$$name = NULL;
- }
+ }
}
/**
* Do we want all pages or only active pages.
*
*
- * @return array - array reference of all contribution pages if any
- * @static
+ * @return array
+ * array reference of all contribution pages if any
*/
public static function &contributionPage($id = NULL, $all = FALSE) {
if ($all) {
*
* @param string $columnName
*
- * @return array - array reference of all payment instruments if any
- * @static
+ * @return array
+ * array reference of all payment instruments if any
*/
public static function &paymentInstrument($columnName = 'label') {
if (!isset(self::$paymentInstrument[$columnName])) {
}
/**
- * Get all the valid accepted credit cards
+ * Get all the valid accepted credit cards.
*
*
- * @return array - array reference of all payment instruments if any
- * @static
+ * @return array
+ * array reference of all payment instruments if any
*/
public static function &creditCard() {
return CRM_Core_OptionGroup::values('accept_creditcard', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
}
/**
- * Get all premiums
+ * Get all premiums.
*
*
* @param int $pageID
- * @return array - array of all Premiums if any
- * @static
+ * @return array
+ * array of all Premiums if any
*/
public static function products($pageID = NULL) {
- $products = array();
- $dao = new CRM_Contribute_DAO_Product();
+ $products = array();
+ $dao = new CRM_Contribute_DAO_Product();
$dao->is_active = 1;
$dao->orderBy('id');
$dao->find();
$products[$dao->id] = $dao->name;
}
if ($pageID) {
- $dao = new CRM_Contribute_DAO_Premium();
+ $dao = new CRM_Contribute_DAO_Premium();
$dao->entity_table = 'civicrm_contribution_page';
- $dao->entity_id = $pageID;
+ $dao->entity_id = $pageID;
$dao->find(TRUE);
$premiumID = $dao->id;
}
/**
- * Get all the contribution statuses
+ * Get all the contribution statuses.
*
*
* @param int $id
* @param string $columnName
- * @return array - array reference of all contribution statuses
- * @static
+ * @return array
+ * array reference of all contribution statuses
*/
public static function &contributionStatus($id = NULL, $columnName = 'label') {
$cacheKey = $columnName;
}
/**
- * Get all the Personal campaign pages
+ * Get all the Personal campaign pages.
*
*
* @param null $pageType
* @param int $id
*
- * @return array - array reference of all pcp if any
- * @static
+ * @return array
+ * array reference of all pcp if any
*/
public static function &pcPage($pageType = NULL, $id = NULL) {
if (!isset(self::$pcPage[$pageType])) {
*
* The static array pcpStatus is returned
*
- * @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
*
- * @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)) {
}
/**
- * Get all batches
+ * Get all batches.
*
*
* @param int $id
- * @return array - array reference of all batches if any
- * @static
+ * @return array
+ * array reference of all batches if any
*/
public static function &batch($id = NULL) {
if (!self::$batch) {
}
return self::$batch;
}
+
}