class ValidHierarchyReferenceConstraint in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Validation/Constraint/ValidHierarchyReferenceConstraint.php \Drupal\entity_hierarchy\Plugin\Validation\Constraint\ValidHierarchyReferenceConstraint
Entity Reference valid reference constraint.
Verifies that referenced entities are valid.
Plugin annotation
@Constraint(
id = "ValidHierarchyReference",
label = @Translation("Entity Reference valid hierarchy reference", context = "Validation")
)
Hierarchy
- class \Drupal\entity_hierarchy\Plugin\Validation\Constraint\ValidHierarchyReferenceConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of ValidHierarchyReferenceConstraint
File
- src/
Plugin/ Validation/ Constraint/ ValidHierarchyReferenceConstraint.php, line 17
Namespace
Drupal\entity_hierarchy\Plugin\Validation\ConstraintView source
class ValidHierarchyReferenceConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'This entity (%type: %id) cannot be referenced as it is either a child or the same entity.';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ValidHierarchyReferenceConstraint:: |
public | property | The default violation message. |