protected static function NameTarget::prepareTarget in Name Field 8
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/ NameTarget.php, line 24
Class
- NameTarget
- Defines a name field mapper.
Namespace
Drupal\name\Feeds\TargetCode
protected static function prepareTarget(FieldDefinitionInterface $field_definition) {
$target_definition = FieldTargetDefinition::createFromFieldDefinition($field_definition);
foreach (_name_component_keys() as $key) {
$target_definition
->addProperty($key);
}
return $target_definition;
}