You are here

function _context_node_get_default_contexts in Context Node 7

Same name and namespace in other branches
  1. 6 context_node.module \_context_node_get_default_contexts()

Return a formatted list of all contexts

1 call to _context_node_get_default_contexts()
context_node_form_alter in ./context_node.module
Implements hook_form_alter()

File

./context_node.module, line 117

Code

function _context_node_get_default_contexts() {
  $contexts = context_enabled_contexts();
  ksort($contexts);
  $con = array();
  $con["none"] = "Disabled";
  $con["default"] = "Default";
  foreach ($contexts as $context) {
    $con[$context->name] = $context->name;
    $cons[] = $con;
  }
  return $con;
}