function display_cache_get_settings in Display Cache 7
Returns display cache settings for given entity type, bundle and view mode.
Parameters
string $entity_type: The entity type like 'node' or 'comment'.
string $bundle: Bundle within the entity type like 'page' or 'article' for nodes.
string $view_mode: View mode like 'full' or 'teaser'.
Return value
array Array with settings.
4 calls to display_cache_get_settings()
- display_cache_entity_view_alter in ./
display_cache.module - Implements hook_entity_view_alter().
- display_cache_field_attach_view_alter in ./
display_cache.module - Implements hook_field_attach_view_alter().
- display_cache_field_ui_form in ./
display_cache.admin.inc - Display cache settings form.
- display_cache_get_cached_display in ./
display_cache.module - Check for cached display.
File
- ./
display_cache.module, line 227 - Module file for Display Cache.
Code
function display_cache_get_settings($entity_type, $bundle, $view_mode) {
$settings = variable_get('display_cache_' . $entity_type . '_' . $bundle . '_' . $view_mode, FALSE);
// Get default settings.
if (!$settings && $view_mode !== 'default') {
$settings = display_cache_get_settings($entity_type, $bundle, 'default');
if (!$settings) {
return array(
'default' => array(
'use' => DISPLAY_CACHE_DISABLED,
'page_granularity' => DISPLAY_CACHE_DISABLED,
'user_granularity' => DISPLAY_CACHE_DISABLED,
'granularity' => DISPLAY_CACHE_DISABLED,
),
);
}
}
return $settings;
}