You are here

public function Action::prepareRow in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/action/src/Plugin/migrate/source/Action.php \Drupal\action\Plugin\migrate\source\Action::prepareRow()

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

File

core/modules/action/src/Plugin/migrate/source/Action.php, line 61

Class

Action
Drupal 6/7 action source from database.

Namespace

Drupal\action\Plugin\migrate\source

Code

public function prepareRow(Row $row) {
  $aid = $row
    ->getSourceProperty('aid');
  if (is_numeric($aid)) {
    if ($this
      ->getModuleSchemaVersion('system') >= 7000) {
      $label = $row
        ->getSourceProperty('label');
    }
    else {
      $label = $row
        ->getSourceProperty('description');
    }
    $row
      ->setSourceProperty('aid', $label);
  }
  return parent::prepareRow($row);
}