loadFullMultiple example

    // is not guaranteed, so invalidate everything in the bin.     $this->menuCacheBackend->invalidateAll();
  }

  /** * Purges multiple menu links that no longer exist. * * @param array $ids * An array of menu link IDs. */
  protected function purgeMultiple(array $ids) {
    $loaded = $this->loadFullMultiple($ids);
    foreach ($loaded as $id => $link) {
      if ($link['has_children']) {
        $children = $this->loadByProperties(['parent' => $id]);
        foreach ($children as $child) {
          $child['parent'] = $link['parent'];
          $this->save($child);
        }
      }
    }
    $this->doDeleteMultiple($ids);
  }

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