8.5.x Row.php Row::setSourceProperty($property, $data)
8.0.x Row.php Row::setSourceProperty($property, $data)
8.1.x Row.php Row::setSourceProperty($property, $data)
8.2.x Row.php Row::setSourceProperty($property, $data)
8.3.x Row.php Row::setSourceProperty($property, $data)
8.4.x Row.php Row::setSourceProperty($property, $data)
8.6.x Row.php Row::setSourceProperty($property, $data)

Sets a source property.

This can only be called from the source plugin.

Parameters

string $property: A property on the source.

mixed $data: The property value to set on the source.

Throws

\Exception

File

core/modules/migrate/src/Row.php, line 166

Class

Row
Stores a row.

Namespace

Drupal\migrate

Code

public function setSourceProperty($property, $data) {
  if ($this->frozen) {
    throw new \Exception("The source is frozen and can't be changed any more");
  }
  else {
    NestedArray::setValue($this->source, explode(static::PROPERTY_SEPARATOR, $property), $data, TRUE);
  }
}