ReferenceAccessConstraint.php 571 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Drupal\Core\Entity\Plugin\Validation\Constraint;
  3. use Symfony\Component\Validator\Constraint;
  4. /**
  5. * Entity Reference valid reference constraint.
  6. *
  7. * Verifies that referenced entities are valid.
  8. *
  9. * @Constraint(
  10. * id = "ReferenceAccess",
  11. * label = @Translation("Entity Reference reference access", context = "Validation")
  12. * )
  13. */
  14. class ReferenceAccessConstraint extends Constraint {
  15. /**
  16. * The default violation message.
  17. *
  18. * @var string
  19. */
  20. public $message = 'You do not have access to the referenced entity (%type: %id).';
  21. }