You are here

public function AssetCollectionGrouperInterface::group in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Asset/AssetCollectionGrouperInterface.php \Drupal\Core\Asset\AssetCollectionGrouperInterface::group()

Groups a collection of assets into logical groups of asset collections.

Parameters

array $assets: An asset collection.

Return value

array A sorted array of asset groups.

2 methods override AssetCollectionGrouperInterface::group()
CssCollectionGrouper::group in core/lib/Drupal/Core/Asset/CssCollectionGrouper.php
Puts multiple items into the same group if they are groupable and if they are for the same 'media' and 'browsers'. Items of the 'file' type are groupable if their 'preprocess' flag is TRUE, and items of the…
JsCollectionGrouper::group in core/lib/Drupal/Core/Asset/JsCollectionGrouper.php
Puts multiple items into the same group if they are groupable and if they are for the same browsers. Items of the 'file' type are groupable if their 'preprocess' flag is TRUE. Items of the 'external' type are not groupable.

File

core/lib/Drupal/Core/Asset/AssetCollectionGrouperInterface.php, line 19

Class

AssetCollectionGrouperInterface
Interface defining a service that logically groups a collection of assets.

Namespace

Drupal\Core\Asset

Code

public function group(array $assets);