Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / entity / tests / modules / entity_module_bundle_plugin_test / src / Plugin / BundlePluginTest / First.php
diff --git a/web/modules/contrib/entity/tests/modules/entity_module_bundle_plugin_test/src/Plugin/BundlePluginTest/First.php b/web/modules/contrib/entity/tests/modules/entity_module_bundle_plugin_test/src/Plugin/BundlePluginTest/First.php
new file mode 100644 (file)
index 0000000..728a90b
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\entity_module_bundle_plugin_test\Plugin\BundlePluginTest;
+
+use Drupal\entity\BundleFieldDefinition;
+use Drupal\Core\Plugin\PluginBase;
+
+/**
+ * Provides the first bundle plugin.
+ *
+ * @BundlePluginTest(
+ *   id = "first",
+ *   label = @Translation("First"),
+ *   description = @Translation("Some description"),
+ * )
+ */
+class First extends PluginBase implements BundlePluginTestInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildFieldDefinitions() {
+    $fields = [];
+    $fields['first_mail'] = BundleFieldDefinition::create('email')
+      ->setLabel(t('Email'))
+      ->setRequired(TRUE);
+
+    return $fields;
+  }
+
+}