function public function CdnAssets::all

8.x-3.x CdnAssets.php public CdnAssets::all($minified = NULL)

Retrieves all assets.

Parameters

bool|bool[] $minified: Flag indicating whether only the minified asset should be retrieved. This can be an associative array where the key is the asset type and the value is a boolean indicating whether to use minified assets for that specific type. If not set, all assets are retrieved regardless if they are minified or not.

Return value

\Drupal\bootstrap\Plugin\Provider\CdnAsset[] An array of CdnAsset objects.

Class

CdnAssets
Class CdnAssets.

Namespace

Drupal\bootstrap\Plugin\Provider

Source src/Plugin/Provider/CdnAssets.php (line 57)

public function all($minified = NULL) {
  $assets = [];
  if (isset($minified) && !is_array($minified)) {
    $minified = ['css' => !!$minified, 'js' => !!$minified];
  }
  foreach (['css', 'js'] as $type) {
    $assets = array_merge($assets, $this->get($type, isset($minified[$type]) ? $minified[$type] : NULL));
  }
  return $assets;
}