Version 1
[yaffs-website] / web / modules / contrib / entity_browser / src / Plugin / EntityBrowser / WidgetValidation / EntityType.php
diff --git a/web/modules/contrib/entity_browser/src/Plugin/EntityBrowser/WidgetValidation/EntityType.php b/web/modules/contrib/entity_browser/src/Plugin/EntityBrowser/WidgetValidation/EntityType.php
new file mode 100644 (file)
index 0000000..1b32e47
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+namespace Drupal\entity_browser\Plugin\EntityBrowser\WidgetValidation;
+
+use Drupal\entity_browser\WidgetValidationBase;
+
+/**
+ * Validates that each passed Entity is of the correct type.
+ *
+ * @EntityBrowserWidgetValidation(
+ *   id = "entity_type",
+ *   label = @Translation("Entity type validator"),
+ *   data_type = "entity_reference",
+ *   constraint = "EntityType"
+ * )
+ */
+class EntityType extends WidgetValidationBase {}