You are here

public function Asset::prepareRow in farmOS 2.x

Adds additional data to the row.

Parameters

\Drupal\migrate\Row $row: The row object.

Return value

bool FALSE if this row needs to be skipped.

Overrides SourcePluginBase::prepareRow

1 call to Asset::prepareRow()
FarmAsset::prepareRow in modules/core/migrate/src/Plugin/migrate/source/d7/FarmAsset.php
Adds additional data to the row.
1 method overrides Asset::prepareRow()
FarmAsset::prepareRow in modules/core/migrate/src/Plugin/migrate/source/d7/FarmAsset.php
Adds additional data to the row.

File

modules/core/asset/src/Plugin/migrate/source/d7/Asset.php, line 53

Class

Asset
Asset source from database.

Namespace

Drupal\asset\Plugin\migrate\source\d7

Code

public function prepareRow(Row $row) {
  $id = $row
    ->getSourceProperty('id');
  $type = $row
    ->getSourceProperty('type');

  // Get Field API field values.
  foreach ($this
    ->getFields('farm_asset', $type) as $field_name => $field) {
    $row
      ->setSourceProperty($field_name, $this
      ->getFieldValues('farm_asset', $field_name, $id));
  }
  return parent::prepareRow($row);
}