You are here

protected static function Geolocation::prepareTarget in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 src/Feeds/Target/Geolocation.php \Drupal\geolocation\Feeds\Target\Geolocation::prepareTarget()

Prepares a target definition.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

Return value

\Drupal\feeds\FieldTargetDefinition The target definition.

Overrides FieldTargetBase::prepareTarget

File

src/Feeds/Target/Geolocation.php, line 24

Class

Geolocation
Defines a geolocation field mapper.

Namespace

Drupal\geolocation\Feeds\Target

Code

protected static function prepareTarget(FieldDefinitionInterface $field_definition) {
  return FieldTargetDefinition::createFromFieldDefinition($field_definition)
    ->addProperty('lat')
    ->addProperty('lng');
}