Uri.php in Feeds 8.3
Same filename in this branch
Namespace
Drupal\feeds\Feeds\TargetFile
src/Feeds/Target/Uri.phpView source
<?php
namespace Drupal\feeds\Feeds\Target;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\feeds\FieldTargetDefinition;
/**
* Defines a string field mapper.
*
* @FeedsTarget(
* id = "uri",
* field_types = {"uri"}
* )
*/
class Uri extends StringTarget {
/**
* {@inheritdoc}
*/
protected static function prepareTarget(FieldDefinitionInterface $field_definition) {
return FieldTargetDefinition::createFromFieldDefinition($field_definition)
->addProperty('value')
->markPropertyUnique('value');
}
}