You are here

public function Row::getSourceProperty in Drupal 9

Same name and namespace in other branches
  1. 8 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\migrate

Code

public function getSourceProperty($property) {
  $return = NestedArray::getValue($this->source, explode(static::PROPERTY_SEPARATOR, $property), $key_exists);
  if ($key_exists) {
    return $return;
  }
}