/** * adds $value['foo_display'] for each $value['foo'] enum from civicrm_acl_contact_cache * * @param array $values (reference) the array up for enhancing * @return void */ static function addDisplayEnums(&$values) { $enumFields =& CRM_Contact_DAO_ACLContactCache::getEnums(); foreach ($enumFields as $enum) { if (isset($values[$enum])) { $values[$enum . '_display'] = CRM_Contact_DAO_ACLContactCache::tsEnum($enum, $values[$enum]); } } }
/** * Returns the list of fields that can be exported * * @param bool $prefix * * @return array */ static function &export($prefix = false) { if (!self::$_export) { self::$_export = array(); $fields = self::fields(); foreach ($fields as $name => $field) { if (CRM_Utils_Array::value('export', $field)) { if ($prefix) { self::$_export['acl_contact_cache'] =& $fields[$name]; } else { self::$_export[$name] =& $fields[$name]; } } } } return self::$_export; }