class ResultRow
Same name in other branches
- 9 core/modules/views/src/ResultRow.php \Drupal\views\ResultRow
- 8.9.x core/modules/views/src/ResultRow.php \Drupal\views\ResultRow
- 10 core/modules/views/src/ResultRow.php \Drupal\views\ResultRow
A class representing a view result row.
Hierarchy
- class \Drupal\views\ResultRow
Expanded class hierarchy of ResultRow
79 files declare their use of ResultRow
- Boolean.php in core/
modules/ views/ src/ Plugin/ views/ field/ Boolean.php - BulkForm.php in core/
modules/ views/ src/ Plugin/ views/ field/ BulkForm.php - BulkFormTest.php in core/
modules/ views/ tests/ src/ Unit/ Plugin/ views/ field/ BulkFormTest.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
File
-
core/
modules/ views/ src/ ResultRow.php, line 8
Namespace
Drupal\viewsView source
class ResultRow {
/**
* The entity for this result.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
// phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
public $_entity = NULL;
/**
* An array of relationship entities.
*
* @var \Drupal\Core\Entity\EntityInterface[]
*/
// phpcs:ignore Drupal.Classes.PropertyDeclaration, Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
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
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ResultRow::$index | public | property | An incremental number which represents the row in the entire result. |
ResultRow::$_entity | public | property | |
ResultRow::$_relationship_entities | public | property | |
ResultRow::resetEntityData | public | function | Resets the _entity and _relationship_entities properties. |
ResultRow::__construct | public | function | Constructs a ResultRow object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.