You are here

public function Row::get in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Row.php \Drupal\migrate\Row::get()
  2. 10 core/modules/migrate/src/Row.php \Drupal\migrate\Row::get()

Retrieve a source or destination property.

If the property key begins with '@' return a destination property, otherwise return a source property. the '@' symbol itself can be escaped as '@@'. Returns NULL if property is not found. Useful in process plugins to retrieve a row property specified in a configuration key which may be either a source or destination property prefixed with an '@'.

Parameters

string $property: The property to get.

Return value

mixed|null The requested property.

File

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

Class

Row
Stores a row.

Namespace

Drupal\migrate

Code

public function get($property) {
  $values = $this
    ->getMultiple([
    $property,
  ]);
  return reset($values);
}