function NodeType::postSave

Same name and namespace in other branches
  1. 10 core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::postSave()
  2. 9 core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::postSave()
  3. 8.9.x core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::postSave()

Overrides ConfigEntityBundleBase::postSave

File

core/modules/node/src/Entity/NodeType.php, line 201

Class

NodeType
Defines the Node type configuration entity.

Namespace

Drupal\node\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  parent::postSave($storage, $update);
  if ($update) {
    // Clear the cached field definitions as some settings affect the field
    // definitions.
    \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.