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

Breadcrumb

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

function Menu::delete

Overrides EntityBase::delete

File

core/modules/system/src/Entity/Menu.php, line 115

Class

Menu
Defines the Menu configuration entity class.

Namespace

Drupal\system\Entity

Code

public function delete() {
    parent::delete();
    \Drupal::cache('menu')->invalidateAll();
    // Invalidate the block cache to update menu-based derivatives.
    if (\Drupal::moduleHandler()->moduleExists('block')) {
        \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal