You are here

function panels_argument_get_context in Panels 5.2

Same name and namespace in other branches
  1. 6.2 includes/plugins.inc \panels_argument_get_context()

Get a context from an argument

3 calls to panels_argument_get_context()
panels_argument_get_contexts in includes/plugins.inc
Retrieve a list of empty contexts for all arguments
panels_argument_load_contexts in includes/plugins.inc
Load the contexts for a given panel.
panels_page_menu in panels_page/panels_page.module
Implementation of hook_menu().

File

includes/plugins.inc, line 755
plugins.inc

Code

function panels_argument_get_context($argument, $arg, $empty = FALSE) {
  if ($function = panels_plugin_get_function('arguments', $argument['name'], 'context')) {
    $context = $function($arg, $argument['argument_settings'], $empty);
    if ($context) {
      $context->identifier = $argument['identifier'];
      $context->page_title = $argument['title'];
      $context->keyword = $argument['keyword'];
      return $context;
    }
  }
}