ReferenceAccessConstraint.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php
  2. 8.9.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php
  3. 11.x core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php

Namespace

Drupal\Core\Entity\Plugin\Validation\Constraint

File

core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php

View source
<?php

namespace Drupal\Core\Entity\Plugin\Validation\Constraint;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;

/**
 * Entity Reference valid reference constraint.
 *
 * Verifies that referenced entities are valid.
 */
class ReferenceAccessConstraint extends SymfonyConstraint {
    
    /**
     * The default violation message.
     *
     * @var string
     */
    public $message = 'You do not have access to the referenced entity (%type: %id).';

}

Classes

Title Deprecated Summary
ReferenceAccessConstraint Entity Reference valid reference constraint.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.