retrieve($caseType); } /** * @param $caseType * * @return mixed|string */ public static function mungeCaseType($caseType) { // trim all spaces from $caseType $caseType = str_replace('_', ' ', $caseType); $caseType = CRM_Utils_String::munge(ucwords($caseType), '', 0); return $caseType; } /** * @param bool $indexName * @param bool $all * * @return array */ function &allActivityTypes($indexName = TRUE, $all = FALSE) { static $activityTypes = NULL; if (!$activityTypes) { $activityTypes = CRM_Case_PseudoConstant::caseActivityType($indexName, $all); } return $activityTypes; } /** * @return array */ function &allRelationshipTypes() { static $relationshipTypes = array(); if (!$relationshipTypes) { $relationshipInfo = CRM_Core_PseudoConstant::relationshipType(); $relationshipTypes = array(); foreach ($relationshipInfo as $id => $info) { $relationshipTypes[$id] = $info[CRM_Case_XMLProcessor::REL_TYPE_CNAME]; } } return $relationshipTypes; } }