You are here

function context_get_info in Context 6.3

Get info for modules. @TODO: It really hurts that we have to do this. See a similar function in features.module and recognize that this should be in system.module but is not...

2 calls to context_get_info()
context_layouts_get_layouts in context_layouts/context_layouts.module
Retrieve layouts for the specified theme.
template_preprocess_context_block_browser in theme/context_reaction_block.theme.inc
Preprocessor for theme('context_block_browser').

File

./context.module, line 475

Code

function context_get_info($type = NULL, $name = NULL, $reset = FALSE) {
  static $info;
  if (!isset($info) || $reset) {
    $result = db_query("SELECT name,type,info FROM {system}");
    while ($row = db_fetch_object($result)) {
      $info[$row->type][$row->name] = unserialize($row->info);
    }
  }
  if (isset($type, $name)) {
    return isset($info[$type][$name]) ? $info[$type][$name] : FALSE;
  }
  else {
    if (isset($type)) {
      return isset($info[$type]) ? $info[$type] : FALSE;
    }
  }
  return $info;
}