function Shortcut::postSave
Overrides ContentEntityBase::postSave
File
- 
              core/modules/ shortcut/ src/ Entity/ Shortcut.php, line 99 
Class
- Shortcut
- Defines the shortcut entity class.
Namespace
Drupal\shortcut\EntityCode
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  parent::postSave($storage, $update);
  // Entity::postSave() calls Entity::invalidateTagsOnSave(), which only
  // handles the regular cases. The Shortcut entity has one special case: a
  // newly created shortcut is *also* added to a shortcut set, so we must
  // invalidate the associated shortcut set's cache tag.
  if (!$update) {
    Cache::invalidateTags($this->getCacheTagsToInvalidate());
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
