You are here

public function Feed::init in Views (for Drupal 7) 8.3

Overrides DisplayPluginBase::init

File

lib/Drupal/views/Plugin/views/display/Feed.php, line 47
Definition of 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->base_table,
  ));
  $default_row_plugin = key($row_plugins);
  if (empty($this->options['row']['type'])) {
    $this->options['row']['type'] = $default_row_plugin;
  }
}