Added Entity and Entity Reference Revisions which got dropped somewhere along the...
[yaffs-website] / web / modules / contrib / entity / src / BundlePlugin / BundlePluginHandlerInterface.php
diff --git a/web/modules/contrib/entity/src/BundlePlugin/BundlePluginHandlerInterface.php b/web/modules/contrib/entity/src/BundlePlugin/BundlePluginHandlerInterface.php
new file mode 100644 (file)
index 0000000..5702fb5
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+namespace Drupal\entity\BundlePlugin;
+
+use Drupal\Core\Entity\EntityHandlerInterface;
+
+/**
+ * Handles plugin-provided bundles.
+ */
+interface BundlePluginHandlerInterface extends EntityHandlerInterface {
+
+  /**
+   * Gets the bundle info.
+   *
+   * @return array
+   *   An array of bundle information keyed by the bundle name.
+   *   The format expected by hook_entity_bundle_info().
+   */
+  public function getBundleInfo();
+
+  /**
+   * Gets the field storage definitions.
+   */
+  public function getFieldStorageDefinitions();
+
+  /**
+   * Gets the field definitions for a specific bundle.
+   *
+   * @param string $bundle
+   *   The bundle name.
+   *
+   * @return \Drupal\entity\BundleFieldDefinition[]
+   *   An array of bundle field definitions, keyed by field name.
+   */
+  public function getFieldDefinitions($bundle);
+
+}