function panels_argument_get_display in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/plugins.inc \panels_argument_get_display()
Choose a display based upon arguments and loaded contexts.
Parameters
$arguments: The array of argument definitions
$contexts: The array of existing contexts.
Return value
The identification of the display to use
1 call to panels_argument_get_display()
- _panels_page_prepare_panels_render in panels_page/
panels_page.render.inc
File
- includes/
plugins.inc, line 852 - plugins.inc
Code
function panels_argument_get_display($arguments, $contexts) {
$display_candidate = NULL;
foreach ($arguments as $i => $argument) {
$id = panels_context_id($argument, 'argument');
if (!empty($contexts[$id]) && !empty($contexts[$id]->data)) {
$context = $contexts[$id];
$d = panels_argument_choose_display($argument['name'], $argument['argument_settings'], $context);
if ($d) {
$display_candidate = "argument_{$i}" . '-' . $d;
}
}
}
return $display_candidate;
}