NodeRow.php

Same filename in other branches
  1. 8.9.x core/modules/node/src/Plugin/views/row/NodeRow.php
  2. 10 core/modules/node/src/Plugin/views/row/NodeRow.php
  3. 11.x core/modules/node/src/Plugin/views/row/NodeRow.php

Namespace

Drupal\node\Plugin\views\row

File

core/modules/node/src/Plugin/views/row/NodeRow.php

View source
<?php

namespace Drupal\node\Plugin\views\row;

use Drupal\views\Plugin\views\row\EntityRow;

/**
 * Plugin which performs a node_view on the resulting object.
 *
 * Most of the code on this object is in the theme function.
 *
 * @ingroup views_row_plugins
 *
 * @ViewsRow(
 *   id = "entity:node",
 * )
 */
class NodeRow extends EntityRow {
    
    /**
     * {@inheritdoc}
     */
    protected function defineOptions() {
        $options = parent::defineOptions();
        $options['view_mode']['default'] = 'teaser';
        return $options;
    }

}

Classes

Title Deprecated Summary
NodeRow Plugin which performs a node_view on the resulting object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.