You are here

public function FieldTargetBase::isEmpty in Feeds 8.3

Returns if the value for the target is empty.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed object.

\Drupal\Core\Entity\EntityInterface $entity: The target object.

string $target: The name of the target to set.

Return value

bool True if the value on the entity is empty. False otherwise.

Overrides TargetInterface::isEmpty

File

src/Plugin/Type/Target/FieldTargetBase.php, line 115

Class

FieldTargetBase
Helper class for field mappers.

Namespace

Drupal\feeds\Plugin\Type\Target

Code

public function isEmpty(FeedInterface $feed, EntityInterface $entity, $field_name) {
  return $entity
    ->get($field_name)
    ->isEmpty();
}