You are here

public function ResourceWarmer::warmMultiple in JSON:API Boost 8

Same name and namespace in other branches
  1. 2.x src/Plugin/warmer/ResourceWarmer.php \Drupal\jsonapi_boost\Plugin\warmer\ResourceWarmer::warmMultiple()

Warms multiple items.

Parameters

array $items: The items to warm.

Return value

int The number of items that were successfully warmed.

Overrides WarmerInterface::warmMultiple

File

src/Plugin/warmer/ResourceWarmer.php, line 121

Class

ResourceWarmer
Warms JSON:API resources.

Namespace

Drupal\jsonapi_boost\Plugin\warmer

Code

public function warmMultiple(array $items = []) {
  $normalizations = array_map([
    $this->entityToJsonapi,
    'normalize',
  ], $items);
  count($normalizations);
}