<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Member_PseudoConstant extends CRM_Core_PseudoConstant {
/**
- * membership types
+ * Membership types
* @var array
* @static
*/
private static $membershipType;
/**
- * membership types
+ * Membership types
* @var array
* @static
*/
/**
* Get all the membership types
*
- * @access public
*
- * @param null $id
+ * @param int $id
* @param bool $force
*
* @return array - array reference of all membership types if any
/**
* Get all the membership statuss
*
- * @access public
*
- * @param null $id
+ * @param int $id
* @param null $cond
* @param string $column
* @param bool $force
* @return array - array reference of all membership statuss if any
* @static
*/
- public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE) {
+ public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE, $allStatus = FALSE) {
if (self::$membershipStatus === NULL) {
self::$membershipStatus = array();
}
if (!isset(self::$membershipStatus[$cacheKey]) || $force) {
CRM_Core_PseudoConstant::populate(self::$membershipStatus[$cacheKey],
'CRM_Member_DAO_MembershipStatus',
- FALSE, $column, 'is_active', $cond, 'weight'
+ $allStatus, $column, 'is_active', $cond, 'weight'
);
}
* Flush given pseudoconstant so it can be reread from db
* next 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;
- }
+ }
}
}
-