function Row::getSourceProperty
Same name in other branches
- 9 core/modules/migrate/src/Row.php \Drupal\migrate\Row::getSourceProperty()
- 8.9.x core/modules/migrate/src/Row.php \Drupal\migrate\Row::getSourceProperty()
- 10 core/modules/migrate/src/Row.php \Drupal\migrate\Row::getSourceProperty()
Retrieves a source property.
This function directly retrieves a source property. It does not unescape '@' symbols. This is most useful in source plugins when you don't want to worry about escaping '@' symbols. If using this in a process plugin to retrieve a source property based on a configuration value, consider if the ::get() function might be more appropriate, to allow the migration to potentially specify a destination key as well.
Parameters
string $property: A property on the source.
Return value
mixed|null The found returned property or NULL if not found.
1 call to Row::getSourceProperty()
- Row::getMultiple in core/
modules/ migrate/ src/ Row.php - Retrieve multiple source and destination properties at once.
File
-
core/
modules/ migrate/ src/ Row.php, line 152
Class
- Row
- Stores a row.
Namespace
Drupal\migrateCode
public function getSourceProperty($property) {
$return = NestedArray::getValue($this->source, explode(static::PROPERTY_SEPARATOR, $property), $key_exists);
if ($key_exists) {
return $return;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.