Version 1
[yaffs-website] / web / core / modules / link / src / Plugin / Validation / Constraint / LinkAccessConstraint.php
diff --git a/web/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php b/web/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
new file mode 100644 (file)
index 0000000..a81f313
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+namespace Drupal\link\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Defines an access validation constraint for links.
+ *
+ * @Constraint(
+ *   id = "LinkAccess",
+ *   label = @Translation("Link URI can be accessed by the user.", context = "Validation"),
+ * )
+ */
+class LinkAccessConstraint extends Constraint {
+
+  public $message = "The path '@uri' is inaccessible.";
+
+}