You are here

interface TargetInterface in Feeds 8.3

Interface for Feed targets.

Hierarchy

Expanded class hierarchy of TargetInterface

All classes that implement TargetInterface

2 files declare their use of TargetInterface
EntityProcessorBase.php in src/Feeds/Processor/EntityProcessorBase.php
MappingForm.php in src/Form/MappingForm.php

File

src/Plugin/Type/Target/TargetInterface.php, line 13

Namespace

Drupal\feeds\Plugin\Type\Target
View source
interface TargetInterface extends DependentWithRemovalPluginInterface {

  /**
   * Returns the targets defined by this plugin.
   *
   * @param \Drupal\feeds\TargetDefinitionInterface[] $targets
   *   An array of targets.
   * @param \Drupal\feeds\FeedTypeInterface $feed_type
   *   The feed type object.
   * @param array $definition
   *   The plugin implementation definition.
   */
  public static function targets(array &$targets, FeedTypeInterface $feed_type, array $definition);

  /**
   * Sets the values on an object.
   *
   * @param \Drupal\feeds\FeedInterface $feed
   *   The feed object.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The target object.
   * @param string $target
   *   The name of the target to set.
   * @param array $values
   *   A list of values to set on the target.
   */
  public function setTarget(FeedInterface $feed, EntityInterface $entity, $target, array $values);

  /**
   * Returns the target's definition.
   *
   * @return \Drupal\feeds\TargetDefinitionInterface
   *   The definition for this target.
   */
  public function getTargetDefinition();

  /**
   * Returns if the target is mutable.
   *
   * @return bool
   *   True if the target is mutable. False otherwise.
   */
  public function isMutable();

  /**
   * Returns if the value for the target is empty.
   *
   * @param \Drupal\feeds\FeedInterface $feed
   *   The feed object.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The target object.
   * @param string $target
   *   The name of the target to set.
   *
   * @return bool
   *   True if the value on the entity is empty. False otherwise.
   */
  public function isEmpty(FeedInterface $feed, EntityInterface $entity, $target);

}

Members

Namesort descending Modifiers Type Description Overrides
DependentWithRemovalPluginInterface::onDependencyRemoval public function Allows a plugin to define whether it should be removed. 1
TargetInterface::getTargetDefinition public function Returns the target's definition. 1
TargetInterface::isEmpty public function Returns if the value for the target is empty. 2
TargetInterface::isMutable public function Returns if the target is mutable. 2
TargetInterface::setTarget public function Sets the values on an object. 2
TargetInterface::targets public static function Returns the targets defined by this plugin. 2