function Row::__construct
Constructs a \Drupal\migrate\Row object.
Parameters
array $values: An array of values to add as properties on the object.
array $source_ids: An array containing the IDs of the source using the keys as the field names.
bool $is_stub: TRUE if the row being created is a stub.
Throws
\InvalidArgumentException Thrown when a source ID property does not exist.
File
- 
              core/
modules/ migrate/ src/ Row.php, line 101  
Class
- Row
 - Stores a row.
 
Namespace
Drupal\migrateCode
public function __construct(array $values = [], array $source_ids = [], $is_stub = FALSE) {
  $this->source = $values;
  $this->sourceIds = $source_ids;
  $this->isStub = $is_stub;
  foreach (array_keys($source_ids) as $id) {
    if (!$this->hasSourceProperty($id)) {
      throw new \InvalidArgumentException("'{$id}' is defined as a source ID but has no value.");
    }
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.