3 namespace Drupal\views;
6 * A class representing a view result row.
11 * The entity for this result.
13 * @var \Drupal\Core\Entity\EntityInterface
15 public $_entity = NULL;
18 * An array of relationship entities.
20 * @var \Drupal\Core\Entity\EntityInterface[]
22 public $_relationship_entities = [];
25 * An incremental number which represents the row in the entire result.
32 * Constructs a ResultRow object.
34 * @param array $values
35 * (optional) An array of values to add as properties on the object.
37 public function __construct(array $values = []) {
38 foreach ($values as $key => $value) {
39 $this->{$key} = $value;
44 * Resets the _entity and _relationship_entities properties.
46 public function resetEntityData() {
47 $this->_entity = NULL;
48 $this->_relationship_entities = [];