public function Row::setSourceProperty in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Row.php \Drupal\migrate\Row::setSourceProperty()
 
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 171  - Contains \Drupal\migrate\Row.
 
Class
- Row
 - Stores a row.
 
Namespace
Drupal\migrateCode
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);
  }
}