UniqueValidationInterface.php 780 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Eav\Model\Entity\Attribute;
  7. use Magento\Framework\DataObject;
  8. use Magento\Eav\Model\Entity\AbstractEntity;
  9. /**
  10. * Interface for unique attribute validator
  11. */
  12. interface UniqueValidationInterface
  13. {
  14. /**
  15. * Validate if attribute value is unique
  16. *
  17. * @param AbstractAttribute $attribute
  18. * @param DataObject $object
  19. * @param AbstractEntity $entity
  20. * @param string $entityLinkField
  21. * @param array $entityIds
  22. * @return bool
  23. */
  24. public function validate(
  25. AbstractAttribute $attribute,
  26. DataObject $object,
  27. AbstractEntity $entity,
  28. $entityLinkField,
  29. array $entityIds
  30. );
  31. }