Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / workspaces / src / Plugin / Validation / Constraint / EntityReferenceSupportedNewEntitiesConstraint.php
diff --git a/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php b/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php
new file mode 100644 (file)
index 0000000..894e343
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\workspaces\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * The entity reference supported new entities constraint.
+ *
+ * @Constraint(
+ *   id = "EntityReferenceSupportedNewEntities",
+ *   label = @Translation("Entity Reference Supported New Entities", context = "Validation"),
+ * )
+ */
+class EntityReferenceSupportedNewEntitiesConstraint extends Constraint {
+
+  /**
+   * The default violation message.
+   *
+   * @var string
+   */
+  public $message = '%collection_label can only be created in the default workspace.';
+
+}