Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / workspaces / src / Plugin / Validation / Constraint / EntityWorkspaceConflictConstraint.php
diff --git a/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraint.php b/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraint.php
new file mode 100644 (file)
index 0000000..8969a5f
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\workspaces\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Validation constraint for an entity being edited in multiple workspaces.
+ *
+ * @Constraint(
+ *   id = "EntityWorkspaceConflict",
+ *   label = @Translation("Entity workspace conflict", context = "Validation"),
+ *   type = {"entity"}
+ * )
+ */
+class EntityWorkspaceConflictConstraint extends Constraint {
+
+  /**
+   * The default violation message.
+   *
+   * @var string
+   */
+  public $message = 'The content is being edited in the %label workspace. As a result, your changes cannot be saved.';
+
+}