Added Entity and Entity Reference Revisions which got dropped somewhere along the...
[yaffs-website] / web / modules / contrib / entity / src / BundlePlugin / BundlePluginInterface.php
diff --git a/web/modules/contrib/entity/src/BundlePlugin/BundlePluginInterface.php b/web/modules/contrib/entity/src/BundlePlugin/BundlePluginInterface.php
new file mode 100644 (file)
index 0000000..b79e65f
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\entity\BundlePlugin;
+
+use Drupal\Component\Plugin\PluginInspectionInterface;
+
+/**
+ * Interface for plugins which act as entity bundles.
+ */
+interface BundlePluginInterface extends PluginInspectionInterface {
+
+  /**
+   * Builds the field definitions for entities of this bundle.
+   *
+   * Important:
+   * Field names must be unique across all bundles.
+   * It is recommended to prefix them with the bundle name (plugin ID).
+   *
+   * @return \Drupal\entity\BundleFieldDefinition[]
+   *   An array of bundle field definitions, keyed by field name.
+   */
+  public function buildFieldDefinitions();
+
+}