function FieldStorageConfig::postSave
Same name in other branches
- 9 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postSave()
- 8.9.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postSave()
- 11.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::postSave()
Overrides EntityBase::postSave
File
-
core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 418
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
if ($update) {
// Invalidate the render cache for all affected entities.
$entity_type_manager = \Drupal::entityTypeManager();
$entity_type = $this->getTargetEntityTypeId();
if ($entity_type_manager->hasHandler($entity_type, 'view_builder')) {
$entity_type_manager->getViewBuilder($entity_type)
->resetCache();
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.