function views_handler_argument::export_style

Special handling for the style export.

Arguments can have styles for the summary view. This special export handler makes sure this works properly.

File

handlers/views_handler_argument.inc, line 838

Class

views_handler_argument
Base class for arguments.

Code

function export_style($indent, $prefix, $storage, $option, $definition, $parents) {
    $output = '';
    $name = $storage[$option];
    $options = $storage['style_options'];
    $plugin = views_get_plugin('style', $name);
    if ($plugin) {
        $plugin->init($this->view, $this->display, $options);
        // Write which plugin to use.
        $output .= $indent . $prefix . "['{$option}'] = '{$name}';\n";
        // Pass off to the plugin to export itself.
        $output .= $plugin->export_options($indent, $prefix . "['style_options']");
    }
    return $output;
}