class ReferenceAccessConstraint in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php \Drupal\Core\Entity\Plugin\Validation\Constraint\ReferenceAccessConstraint
- 9 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\ConstraintView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ReferenceAccessConstraint:: |
public | property | The default violation message. |