protected static function OfficeHours::prepareTarget in Office Hours 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/ OfficeHours.php, line 22
Class
- OfficeHours
- Defines a office_hours field mapper.
Namespace
Drupal\office_hours\Feeds\TargetCode
protected static function prepareTarget(FieldDefinitionInterface $field_definition) {
$definition = FieldTargetDefinition::createFromFieldDefinition($field_definition);
if ($field_definition
->getType() === 'office_hours') {
$definition
->addProperty('day')
->addProperty('starthours')
->addProperty('endhours')
->addProperty('comment');
}
return $definition;
}