function Row::get

Same name in other branches
  1. 9 core/modules/migrate/src/Row.php \Drupal\migrate\Row::get()
  2. 8.9.x core/modules/migrate/src/Row.php \Drupal\migrate\Row::get()
  3. 11.x 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 327

Class

Row
Stores a row.

Namespace

Drupal\migrate

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.