You are here

function views_plugin_display::export_style in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 plugins/ \views_plugin_display::export_style()

Special handling for the style export.

Styles are stored as style_plugin and style_options or row_plugin and row_options accordingly. The options are told not to export, and the export for the plugin should export both.


plugins/, line 2665
Contains the base display plugin.


The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.


function export_style($indent, $prefix, $storage, $option, $definition, $parents) {
  $output = '';
  $style_plugin = $this
  if ($option == 'style_plugin') {
    $type = 'style';
    $options_field = 'style_options';
    $plugin = $style_plugin;
  else {
    if (!$style_plugin || !$style_plugin
      ->uses_row_plugin()) {
    $type = 'row';
    $options_field = 'row_options';
    $plugin = $this

    // If the style plugin doesn't use row plugins, don't even bother.
  if ($plugin) {

    // Write which plugin to use.
    $value = $this
    $output .= $indent . $prefix . "['{$option}'] = '{$value}';\n";

    // Pass off to the plugin to export itself.
    $output .= $plugin
      ->export_options($indent, $prefix . "['{$options_field}']");
  return $output;