You are here

interface MigrateValidatableEntityInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/MigrateValidatableEntityInterface.php \Drupal\migrate\Plugin\MigrateValidatableEntityInterface
  2. 9 core/modules/migrate/src/Plugin/MigrateValidatableEntityInterface.php \Drupal\migrate\Plugin\MigrateValidatableEntityInterface

To implement by a destination plugin that should provide entity validation.

Hierarchy

Expanded class hierarchy of MigrateValidatableEntityInterface

All classes that implement MigrateValidatableEntityInterface

Related topics

1 file declares its use of MigrateValidatableEntityInterface
EntityContentBase.php in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php

File

core/modules/migrate/src/Plugin/MigrateValidatableEntityInterface.php, line 14

Namespace

Drupal\migrate\Plugin
View source
interface MigrateValidatableEntityInterface {

  /**
   * Returns a state of whether an entity needs to be validated before saving.
   *
   * @param \Drupal\Core\Entity\FieldableEntityInterface $entity
   *   The entity to check for required validation.
   *
   * @return bool
   *   A state of whether an entity needs to be validated.
   */
  public function isEntityValidationRequired(FieldableEntityInterface $entity);

  /**
   * Validates the entity.
   *
   * @param \Drupal\Core\Entity\FieldableEntityInterface $entity
   *   The entity to validate.
   *
   * @throws \Drupal\migrate\Exception\EntityValidationException
   *   When the validation didn't succeed.
   */
  public function validateEntity(FieldableEntityInterface $entity);

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateValidatableEntityInterface::isEntityValidationRequired public function Returns a state of whether an entity needs to be validated before saving. 1
MigrateValidatableEntityInterface::validateEntity public function Validates the entity. 1