function panels_views_pane_arguments in Panels 5.2
Adjust a pane for a view's arguments, adding or subtracting as needed to match the current view's argument configuration.
1 call to panels_views_pane_arguments()
- panels_views_edit_view_form in panels_views/
panels_views.module - Form to add or edit add a view pane.
File
- panels_views/
panels_views.module, line 1292 - panels_views.module
Code
function panels_views_pane_arguments($view, &$panel_view) {
$contexts = array();
foreach ($view->argument as $id => $arg) {
if (empty($panel_view->contexts[$id])) {
$contexts[$id] = array(
'type' => 'context',
'context' => 'any',
'panel' => 0,
'fixed' => '',
);
}
else {
$contexts[$id] = $panel_view->contexts[$id];
}
}
// By copying this back, we automatically erase any arguments that may
// no longer exist.
$panel_view->contexts = $contexts;
}