You are here

public function CdnWarmer::loadMultiple in Warmer 2.x

Same name and namespace in other branches
  1. 8 modules/warmer_cdn/src/Plugin/warmer/CdnWarmer.php \Drupal\warmer_cdn\Plugin\warmer\CdnWarmer::loadMultiple()

Loads multiple items based on their IDs.

Parameters

array: The item IDs.

Return value

array The loaded items.

Overrides WarmerInterface::loadMultiple

File

modules/warmer_cdn/src/Plugin/warmer/CdnWarmer.php, line 48

Class

CdnWarmer
The cache warmer for the built-in entity cache.

Namespace

Drupal\warmer_cdn\Plugin\warmer

Code

public function loadMultiple(array $ids = []) {

  // Ensure items are fully loaded URLs.
  $urls = array_map([
    $this,
    'resolveUri',
  ], $ids);
  return array_filter($urls, [
    UrlHelper::class,
    'isValid',
  ]);
}