public function Feed::init

Overrides DisplayPluginBase::init

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php, line 45
Contains Drupal\views\Plugin\views\display\Feed.

Class

Feed
The plugin that handles a feed, such as RSS or atom.

Namespace

Drupal\views\Plugin\views\display

Code

public function init(ViewExecutable $view, &$display, $options = NULL) {
  parent::init($view, $display, $options);

  // Set the default row style. Ideally this would be part of the option
  // definition, but in this case it's dependent on the view's base table,
  // which we don't know until init().
  $row_plugins = views_fetch_plugin_names('row', $this
    ->getStyleType(), array(
    $view->storage
      ->get('base_table'),
  ));
  $default_row_plugin = key($row_plugins);
  if (empty($this->options['row']['type'])) {
    $this->options['row']['type'] = $default_row_plugin;
  }
}