You are here

function views_data_export_plugin_style_export_xml::init in Views data export 7.3

Same name and namespace in other branches
  1. 6.2 plugins/views_data_export_plugin_style_export_xml.inc \views_data_export_plugin_style_export_xml::init()

Initialize a style plugin.

Overrides views_plugin_style::init

File

plugins/views_data_export_plugin_style_export_xml.inc, line 17
Plugin include file for export style plugin.

Class

views_data_export_plugin_style_export_xml
Generalized style plugin for export plugins.

Code

function init(&$view, &$display, $options = NULL) {

  // View is not set in option_definition(), so we fill defaults here if
  // options are empty.
  if (empty($options['root_node']) || empty($options['item_node'])) {
    $base_object_name = rtrim($view->base_table, 's');
    if (empty($options['root_node'])) {
      $options['root_node'] = $base_object_name . 's';
    }
    if (empty($options['item_node'])) {
      $options['item_node'] = $base_object_name;
    }
  }
  parent::init($view, $display, $options);
}