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