You are here

function views_content_context_view_get_child in Chaos Tool Suite (ctools) 7

1 string reference to 'views_content_context_view_get_child'
view.inc in views_content/plugins/contexts/view.inc
Plugin to provide a node context. A node context is a node wrapped in a context object that can be utilized by anything that accepts contexts.

File

views_content/plugins/contexts/view.inc, line 31
Plugin to provide a node context. A node context is a node wrapped in a context object that can be utilized by anything that accepts contexts.

Code

function views_content_context_view_get_child($plugin, $parent, $child) {
  list($name, $id) = explode('-', $child, 2);
  $view = views_get_view($name);
  if (!$view) {
    return;
  }
  $view
    ->set_display($id);
  if ($view->current_display != $id) {
    return;
  }
  $info = _views_content_get_context_from_display($view, $id, $parent, FALSE);
  if ($info) {
    return $info;
  }
  return;
}