You are here

function _views_maintenance_display_id_from_context in Views Maintenance 6

Same name and namespace in other branches
  1. 7 includes/ctools.inc \_views_maintenance_display_id_from_context()

Returns view name and display ID used by context handler.

Parameters

object $context:

Return value

array|null Numerical array suitable for list() or NULL if context doesn't use views.

2 calls to _views_maintenance_display_id_from_context()
_views_maintenance_mini_panel_use_cases in includes/ctools.inc
Returns displays use cases in all mini-panels.
_views_maintenance_process_page_handlers in includes/ctools.inc
Processes handlers of task or subtask and returns use cases.

File

includes/ctools.inc, line 294
Provides integration with Page Manager and Panels Mini.

Code

function _views_maintenance_display_id_from_context($context) {
  switch ($context->type) {
    case 'view':
      if (!empty($context->argument)) {
        return explode(':', $context->argument, 2);
      }
    default:
      return NULL;
  }
}