Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BlockContent.php

function BlockContent::invalidateBlockPluginCache

Invalidates the block plugin cache after changes and deletions.

2 calls to BlockContent::invalidateBlockPluginCache()
BlockContent::postDelete in core/modules/block_content/src/Entity/BlockContent.php
Acts on deleted entities before the delete hook is invoked.
BlockContent::postSave in core/modules/block_content/src/Entity/BlockContent.php
Acts on a saved entity before the insert or update hook is invoked.

File

core/modules/block_content/src/Entity/BlockContent.php, line 280

Class

BlockContent
Defines the content block entity class.

Namespace

Drupal\block_content\Entity

Code

protected static function invalidateBlockPluginCache() {
    // Invalidate the block cache to update content block-based derivatives.
    \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
RSS feed
Powered by Drupal