You are here

function ccl_cache_get in Custom Contextual Links 7

Same name and namespace in other branches
  1. 8 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 151
Main CCL module file.

Code

function ccl_cache_get($type) {
  $cache = cache_get($type);

  // If nothing is set in the cache then recreate it.
  if (!isset($cache->cid)) {
    _ccl_update_cache();
    $cache = cache_get($type);
  }
  return $cache ? $cache->data : null;
}