public function BundlePluginInterface::buildFieldDefinitions in Entity API 8
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 value
\Drupal\entity\BundleFieldDefinition[] An array of bundle field definitions, keyed by field name.
2 methods override BundlePluginInterface::buildFieldDefinitions()
- First::buildFieldDefinitions in tests/
modules/ entity_module_bundle_plugin_test/ src/ Plugin/ BundlePluginTest/ First.php - Builds the field definitions for entities of this bundle.
- Second::buildFieldDefinitions in tests/
modules/ entity_module_bundle_plugin_examples_test/ src/ Plugin/ BundlePluginTest/ Second.php - Builds the field definitions for entities of this bundle.
File
- src/
BundlePlugin/ BundlePluginInterface.php, line 22
Class
- BundlePluginInterface
- Interface for plugins which act as entity bundles.
Namespace
Drupal\entity\BundlePluginCode
public function buildFieldDefinitions();