Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / entity / src / BundlePlugin / BundlePluginInstallerInterface.php
diff --git a/web/modules/contrib/entity/src/BundlePlugin/BundlePluginInstallerInterface.php b/web/modules/contrib/entity/src/BundlePlugin/BundlePluginInstallerInterface.php
new file mode 100644 (file)
index 0000000..afeacee
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\entity\BundlePlugin;
+
+use Drupal\Core\Entity\EntityTypeInterface;
+
+/**
+ * Installs and uninstalls bundle plugins.
+ *
+ * Ensures that the fields provided by the bundle plugins are created/deleted.
+ */
+interface BundlePluginInstallerInterface {
+
+  /**
+   * Installs the bundle plugins provided by the specified modules.
+   *
+   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
+   *   The entity type.
+   * @param array $modules
+   *   The modules.
+   */
+  public function installBundles(EntityTypeInterface $entity_type, array $modules);
+
+  /**
+   * Uninstalls the bundle plugins provided by the specified modules.
+   *
+   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
+   *   The entity type.
+   * @param array $modules
+   *   The modules.
+   */
+  public function uninstallBundles(EntityTypeInterface $entity_type, array $modules);
+
+}