function ccl_cache_get in Custom Contextual Links 8
Same name and namespace in other branches
- 7 ccl.module \ccl_cache_get()
Helper function to get ccl settings out of the cache.
5 calls to ccl_cache_get()
- ccl_actions_ccl_add_link in ccl_actions/
ccl_actions.module - Hook function to process the contextual links element.
- ccl_blocks_ccl_add_link in ccl_blocks/
ccl_blocks.module - Hook function to process the contextual links element.
- ccl_contextual_links_view_alter in ./
ccl.module - Implements hook_contextual_links_view_alter().
- ccl_local_actions_menu_local_tasks_alter in ccl_local_actions/
ccl_local_actions.module - Implements hook_menu_local_tasks_alter().
- ccl_views_ccl_add_link in ccl_views/
ccl_views.module - Hook function to process the contextual links element.
File
- ./
ccl.module, line 149 - Main CCL module file.
Code
function ccl_cache_get($type) {
$cache = \Drupal::cache()
->get($type);
// If nothing is set in the cache then recreate it.
if (!isset($cache->cid)) {
_ccl_update_cache();
$cache = \Drupal::cache()
->get($type);
}
return $cache->data;
}