Version 1
[yaffs-website] / web / core / modules / node / src / Plugin / views / row / NodeRow.php
diff --git a/web/core/modules/node/src/Plugin/views/row/NodeRow.php b/web/core/modules/node/src/Plugin/views/row/NodeRow.php
new file mode 100644 (file)
index 0000000..7f061ba
--- /dev/null
@@ -0,0 +1,31 @@
+<?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;
+  }
+
+}