function views_handler_argument_date::export_plugin
Adapt the export mechanism.
The date handler provides some default argument types, which aren't argument default plugins.
Overrides views_handler_argument::export_plugin
File
-
handlers/
views_handler_argument_date.inc, line 92
Class
- views_handler_argument_date
- Abstract argument handler for dates.
Code
public function export_plugin($indent, $prefix, $storage, $option, $definition, $parents) {
// Only use a special behaviour for the special argument types, else just
// use the default behaviour.
if ($option == 'default_argument_type') {
$name = $this->options[$option];
if (in_array($name, array(
'date',
'node_created',
'node_changed',
))) {
// Write which plugin to use.
$output = $indent . $prefix . "['{$option}'] = '{$name}';\n";
return $output;
}
}
return parent::export_plugin($indent, $prefix, $storage, $option, $definition, $parents);
}