From a8781c66d905916f3c9cea3e50b874fb2cf01421 Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 16 Apr 2014 06:14:10 +0530 Subject: [PATCH] HR-324 : add filter to case type --- CRM/Case/PseudoConstant.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index c07e0cfae7..f2700cc727 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -141,11 +141,14 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * @return array - array reference of all case type * @static */ - public static function caseType($column = 'label', $onlyActive = TRUE) { + public static function caseType($column = 'label', $onlyActive = TRUE, $condition = NULL) { $cacheKey = "{$column}_" . (int)$onlyActive; + if (!$condition) { + $condition = 'AND filter = 0'; + } if (!isset(self::$caseType[$cacheKey])) { self::$caseType[$cacheKey] = CRM_Core_OptionGroup::values('case_type', - FALSE, FALSE, FALSE, NULL, + FALSE, FALSE, FALSE, $condition, $column, $onlyActive ); } -- 2.25.1