function ResultRow::__construct

Same name in other branches
  1. 9 core/modules/views/src/ResultRow.php \Drupal\views\ResultRow::__construct()
  2. 8.9.x core/modules/views/src/ResultRow.php \Drupal\views\ResultRow::__construct()
  3. 11.x core/modules/views/src/ResultRow.php \Drupal\views\ResultRow::__construct()

Constructs a ResultRow object.

Parameters

array $values: (optional) An array of values to add as properties on the object.

File

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

Class

ResultRow
A class representing a view result row.

Namespace

Drupal\views

Code

public function __construct(array $values = []) {
    foreach ($values as $key => $value) {
        $this->{$key} = $value;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.