function BlockContent::invalidateBlockPluginCache
Same name and namespace in other branches
- 11.x core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent::invalidateBlockPluginCache()
- 10 core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent::invalidateBlockPluginCache()
- 8.9.x core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent::invalidateBlockPluginCache()
Invalidates the block plugin cache after changes and deletions.
File
-
core/
modules/ block_content/ src/ Entity/ BlockContent.php, line 318
Class
- BlockContent
- Defines the custom block entity class.
Namespace
Drupal\block_content\EntityCode
protected static function invalidateBlockPluginCache() {
// Invalidate the block cache to update custom block-based derivatives.
\Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.