You are here

class ResultRow in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/ResultRow.php \Drupal\views\ResultRow
  2. 9 core/modules/views/src/ResultRow.php \Drupal\views\ResultRow

Hierarchy

Expanded class hierarchy of ResultRow

57 files declare their use of ResultRow
BulkForm.php in core/modules/views/src/Plugin/views/field/BulkForm.php
CachePluginBase.php in core/modules/views/src/Plugin/views/cache/CachePluginBase.php
CommentedEntity.php in core/modules/comment/src/Plugin/views/field/CommentedEntity.php
ConfigurableLanguageRenderer.php in core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php
ContactLink.php in core/modules/contact/src/Plugin/views/field/ContactLink.php

... See full list

File

core/modules/views/src/ResultRow.php, line 9

Namespace

Drupal\views
View source
class ResultRow {

  /**
   * The entity for this result.
   *
   * @var \Drupal\Core\Entity\EntityInterface
   */

  // phpcs:ignore Drupal.Classes.PropertyDeclaration
  public $_entity = NULL;

  /**
   * An array of relationship entities.
   *
   * @var \Drupal\Core\Entity\EntityInterface[]
   */

  // phpcs:ignore Drupal.Classes.PropertyDeclaration
  public $_relationship_entities = [];

  /**
   * An incremental number which represents the row in the entire result.
   *
   * @var int
   */
  public $index;

  /**
   * Constructs a ResultRow object.
   *
   * @param array $values
   *   (optional) An array of values to add as properties on the object.
   */
  public function __construct(array $values = []) {
    foreach ($values as $key => $value) {
      $this->{$key} = $value;
    }
  }

  /**
   * Resets the _entity and _relationship_entities properties.
   */
  public function resetEntityData() {
    $this->_entity = NULL;
    $this->_relationship_entities = [];
  }

}

Members