You are here

public function LocationGeolocationFieldWidget::prepareRow in Geolocation Field 8.3

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 FieldInstance::prepareRow

File

modules/geolocation_address/src/Plugin/migrate/source/LocationGeolocationFieldWidget.php, line 60

Class

LocationGeolocationFieldWidget
Drupal 7 geolocation field widget settings source for D7 location fields.

Namespace

Drupal\geolocation_address\Plugin\migrate\source

Code

public function prepareRow(Row $row, $keep = TRUE) {
  if (!parent::prepareRow($row)) {
    return FALSE;
  }
  $geolocation_field_name = Location::getGeolocationFieldName($row
    ->getSourceProperty('field_name'));
  $row
    ->setSourceProperty('geolocation_field_name', $geolocation_field_name);
  return TRUE;
}