public function FieldDefinition::getConfig in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/FieldDefinition.php \Drupal\Core\Field\FieldDefinition::getConfig()
- 9 core/lib/Drupal/Core/Field/FieldDefinition.php \Drupal\Core\Field\FieldDefinition::getConfig()
Gets an object that can be saved in configuration.
Base fields are defined in code. In order to configure field definition properties per bundle use this method to create an override that can be saved in configuration.
Parameters
string $bundle: The bundle to get the configurable field for.
Return value
\Drupal\Core\Field\FieldConfigInterface
Overrides FieldDefinitionInterface::getConfig
See also
\Drupal\Core\Field\Entity\BaseFieldBundleOverride
File
- core/
lib/ Drupal/ Core/ Field/ FieldDefinition.php, line 272
Class
- FieldDefinition
- A class for defining entity field definitions.
Namespace
Drupal\Core\FieldCode
public function getConfig($bundle) {
// @todo provide a FieldDefinitionOverride config entity in
// https://www.drupal.org/project/drupal/issues/2935978.
throw new \Exception('Field definitions do not currently have an override config entity.');
}