You are here

Uri.php in Feeds 8.3

File

src/Feeds/Target/Uri.php
View 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');
  }

}

Classes

Namesort descending Description
Uri Defines a string field mapper.