Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / path / src / Plugin / Validation / Constraint / PathAliasConstraint.php
diff --git a/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php b/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
new file mode 100644 (file)
index 0000000..4136d26
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+namespace Drupal\path\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Validation constraint for changing path aliases in pending revisions.
+ *
+ * @Constraint(
+ *   id = "PathAlias",
+ *   label = @Translation("Path alias.", context = "Validation"),
+ * )
+ */
+class PathAliasConstraint extends Constraint {
+
+  public $message = 'You can only change the URL alias for the <em>published</em> version of this content.';
+
+}