You are here

DataEntityRow.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/rest/src/Plugin/views/row/DataEntityRow.php

File

core/modules/rest/src/Plugin/views/row/DataEntityRow.php
View source
<?php

/**
 * @file
 * Contains \Drupal\rest\Plugin\views\row\DataEntityRow.
 */
namespace Drupal\rest\Plugin\views\row;

use Drupal\views\Plugin\views\row\RowPluginBase;

/**
 * Plugin which displays entities as raw data.
 *
 * @ingroup views_row_plugins
 *
 * @ViewsRow(
 *   id = "data_entity",
 *   title = @Translation("Entity"),
 *   help = @Translation("Use entities as row data."),
 *   display_types = {"data"}
 * )
 */
class DataEntityRow extends RowPluginBase {

  /**
   * {@inheritdoc}
   */
  protected $usesOptions = FALSE;

  /**
   * {@inheritdoc}
   */
  public function render($row) {
    return $row->_entity;
  }

}

Classes

Namesort descending Description
DataEntityRow Plugin which displays entities as raw data.