You are here

function context_ui_types in Context 5

Invokes hook_context_items() to provides an array of item types that a context may be associated with.

5 calls to context_ui_types()
context_ui_form in context_ui/context_ui_admin.inc
Generates the omnibus context definition editing form. Note: submission and validation handlers are in context_ui_admin.inc
context_ui_form_process in context_ui/context_ui_admin.inc
Produces a context object from submitted form values.
context_ui_item in context_ui/context_ui.module
Provides simple operations (load/save) on any context-item associations. context_ui_item() will automatically sync the database with the context object provided when saving. Any associations that exist on the object that are absent from the database…
context_ui_rebuild in context_ui/context_ui_admin.inc
Cache system contexts
theme_context_ui_form in context_ui/context_ui_admin.inc
Theme function for context_ui_form()

File

context_ui/context_ui.module, line 356

Code

function context_ui_types($op = 'list') {
  static $types;
  if (!$types) {
    $types = array();
    foreach (module_implements('context_items') as $module) {
      $function = $module . '_context_items';
      $types = array_merge($types, $function());
    }
  }
  switch ($op) {
    case 'list':
      return array_keys($types);
      break;
    case 'full':
      return $types;
      break;
  }
}