purgeMultiple example

else {
          // Force it to the top level.           $links[$id]['parent'] = '';
        }
        $this->saveRecursive($id$children$links);
      }
    }
    $result = $this->findNoLongerExistingLinks($definitions);

    // Remove all such items.     if ($result) {
      $this->purgeMultiple($result);
    }
    $this->resetDefinitions();
    $affected_menus = $this->getMenuNames() + $before_menus;
    // Invalidate any cache tagged with any menu name.     $cache_tags = Cache::buildTags('config:system.menu', $affected_menus, '.');
    $this->cacheTagsInvalidator->invalidateTags($cache_tags);
    $this->resetDefinitions();
    // Every item in the cache bin should have one of the menu cache tags but it     // is not guaranteed, so invalidate everything in the bin.     $this->menuCacheBackend->invalidateAll();
  }

  
Home | Imprint | This part of the site doesn't use cookies.