You are here

protected function Node::display_options_row in Views (for Drupal 7) 8.3

Set the row style and row style plugins to the display_options.

2 calls to Node::display_options_row()
Node::block_display_options in lib/Views/node/Plugin/views/wizard/Node.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().
Node::page_display_options in lib/Views/node/Plugin/views/wizard/Node.php
Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::page_display_options().

File

lib/Views/node/Plugin/views/wizard/Node.php, line 219
Definition of Views\node\Plugin\views\wizard\Node.

Class

Node
Tests creating node views with the wizard.

Namespace

Views\node\Plugin\views\wizard

Code

protected function display_options_row(&$display_options, $row_plugin, $row_options) {
  switch ($row_plugin) {
    case 'full_posts':
      $display_options['row']['type'] = 'node';
      $display_options['row']['options']['build_mode'] = 'full';
      $display_options['row']['options']['links'] = !empty($row_options['links']);
      $display_options['row']['options']['comments'] = !empty($row_options['comments']);
      break;
    case 'teasers':
      $display_options['row']['type'] = 'node';
      $display_options['row']['options']['build_mode'] = 'teaser';
      $display_options['row']['options']['links'] = !empty($row_options['links']);
      $display_options['row']['options']['comments'] = !empty($row_options['comments']);
      break;
    case 'titles_linked':
      $display_options['row']['type'] = 'fields';
      $display_options['field']['title']['link_to_node'] = 1;
      break;
    case 'titles':
      $display_options['row']['type'] = 'fields';
      $display_options['field']['title']['link_to_node'] = 0;
      break;
  }
}