function EntityViewDisplay::postSave

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::postSave()
  2. 8.9.x core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::postSave()
  3. 10 core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php \Drupal\Core\Entity\Entity\EntityViewDisplay::postSave()

Overrides EntityBase::postSave

File

core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php, line 187

Class

EntityViewDisplay
Configuration entity.

Namespace

Drupal\Core\Entity\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
    // Reset the render cache for the target entity type.
    parent::postSave($storage, $update);
    if (\Drupal::entityTypeManager()->hasHandler($this->targetEntityType, 'view_builder')) {
        \Drupal::entityTypeManager()->getViewBuilder($this->targetEntityType)
            ->resetCache();
    }
}

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