hook_entity_field_storage_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type)
Alter field storage definitions for a content entity type.
\Drupal\Core\Field\FieldStorageDefinitionInterface[] $fields: The array of field storage definitions for the entity type.
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
hook_entity_field_storage_info()
function hook_entity_field_storage_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) { // Alter the max_length setting. if ($entity_type->id() == 'node' && !empty($fields['mymodule_text'])) { $fields['mymodule_text']->setSetting('max_length', 128); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_entity_field_storage_info_alter/8.1.x