function MenuTreeStorage::save

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::save()
  2. 10 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::save()
  3. 11.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::save()

Overrides MenuTreeStorageInterface::save

2 calls to MenuTreeStorage::save()
MenuTreeStorage::delete in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Deletes a menu link definition from the storage.
MenuTreeStorage::purgeMultiple in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Purges multiple menu links that no longer exist.

File

core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 257

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

public function save(array $link) {
    $affected_menus = $this->doSave($link);
    $this->resetDefinitions();
    $cache_tags = Cache::buildTags('config:system.menu', $affected_menus, '.');
    $this->cacheTagsInvalidator
        ->invalidateTags($cache_tags);
    return $affected_menus;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.