You are here

interface BundlePluginInterface in Entity API 8

Interface for plugins which act as entity bundles.

Hierarchy

Expanded class hierarchy of BundlePluginInterface

All classes that implement BundlePluginInterface

1 file declares its use of BundlePluginInterface
BundlePluginTestInterface.php in tests/modules/entity_module_bundle_plugin_test/src/Plugin/BundlePluginTest/BundlePluginTestInterface.php

File

src/BundlePlugin/BundlePluginInterface.php, line 10

Namespace

Drupal\entity\BundlePlugin
View source
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();

}

Members

Namesort descending Modifiers Type Description Overrides
BundlePluginInterface::buildFieldDefinitions public function Builds the field definitions for entities of this bundle. 2
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2