You are here

protected function TransactionTypeStorage::clearLocalTaskCache in Transaction 8

Clear caches involved in target entity local task.

2 calls to TransactionTypeStorage::clearLocalTaskCache()
TransactionTypeStorage::doDelete in src/TransactionTypeStorage.php
Performs storage-specific entity deletion.
TransactionTypeStorage::doPostSave in src/TransactionTypeStorage.php
Performs post save entity processing.

File

src/TransactionTypeStorage.php, line 176

Class

TransactionTypeStorage
Transaction type storage handler.

Namespace

Drupal\transaction

Code

protected function clearLocalTaskCache() {

  // When local task enabled, a link template is added to the target entity
  // type definitions.
  $this->entityTypeManager
    ->clearCachedDefinitions();
  $this->fieldManager
    ->clearCachedFieldDefinitions();

  // Invalidate block view to rebuild menu and local task blocks.
  $this->cacheTagsInvalidator
    ->invalidateTags([
    'block_view',
  ]);

  // Action links has to be re-discovered.
  $this->cacheDiscovery
    ->invalidateAll();

  // A route per transaction type and target entity will be added.
  $this->routeBuilder
    ->rebuild();
}