function panels_plugin_display_panel_pane::get_argument_input in Panels 6.2
Adjust the array of argument input to match the current list of arguments available for this display. This ensures that changing the arguments doesn't cause the argument input field to just break.
1 call to panels_plugin_display_panel_pane::get_argument_input()
- panels_plugin_display_panel_pane::options_form in panels_views/
panels_plugin_display_panel_pane.inc - Provide the default form for setting options.
File
- panels_views/
panels_plugin_display_panel_pane.inc, line 324
Class
- panels_plugin_display_panel_pane
- The plugin that handles a panel_pane.
Code
function get_argument_input() {
$arguments = $this
->get_option('argument_input');
$handlers = $this
->get_handlers('argument');
// We use a separate output so as to seamlessly discard info for
// arguments that no longer exist.
$output = array();
foreach ($handlers as $id => $handler) {
if (empty($arguments[$id])) {
$output[$id] = array(
'type' => 'none',
'context' => 'any',
'panel' => 0,
'fixed' => '',
'name' => $handler
->ui_name(),
);
}
else {
$output[$id] = $arguments[$id];
$output[$id]['name'] = $handler
->ui_name();
}
}
return $output;
}