class ReferenceAccessConstraint

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

Entity Reference valid reference constraint.

Verifies that referenced entities are valid.

Plugin annotation


@Constraint(
  id = "ReferenceAccess",
  label = @Translation("Entity Reference reference access", context = "Validation")
)

Hierarchy

  • class \Drupal\Core\Entity\Plugin\Validation\Constraint\ReferenceAccessConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of ReferenceAccessConstraint

File

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

Namespace

Drupal\Core\Entity\Plugin\Validation\Constraint
View source
class ReferenceAccessConstraint extends Constraint {
    
    /**
     * The default violation message.
     *
     * @var string
     */
    public $message = 'You do not have access to the referenced entity (%type: %id).';

}

Members

Title Sort descending Modifiers Object type Summary
ReferenceAccessConstraint::$message public property The default violation message.

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