You are here

function context_ui_menu_load in Context 6.2

Same name and namespace in other branches
  1. 6 context_ui/context_ui.module \context_ui_menu_load()

Helper loader to parse menu arguments and load contexts accordingly.

File

context_ui/context_ui.module, line 160

Code

function context_ui_menu_load($arg) {
  if (is_numeric($arg)) {
    return context_load_context($arg);
  }
  else {
    $contexts = context_contexts();
    if (!empty($contexts[$arg])) {
      return $contexts[$arg];
    }
  }
}