/** * {@inheritdoc} */ public function newDisplay() { parent::newDisplay(); // 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(). if (empty($this->options['row']['type']) || $this->options['row']['type'] === 'rss_fields') { $row_plugins = Views::fetchPluginNames('row', $this->getType(), array($this->view->storage->get('base_table'))); $default_row_plugin = key($row_plugins); $options = $this->getOption('row'); $options['type'] = $default_row_plugin; $this->setOption('row', $options); } }