private function HtmlResponseAttachmentsProcessor::markAssetsAsBlocked in Cookie Content Blocker 8
Mark all individual assets as blocked.
Makes sure they are not preprocesses or cached.
Parameters
array $assets: The assets to mark.
Return value
array The marked assets.
1 call to HtmlResponseAttachmentsProcessor::markAssetsAsBlocked()
- HtmlResponseAttachmentsProcessor::getMergedAndSortedAssets in src/
Render/ HtmlResponseAttachmentsProcessor.php - Merges and sorts allowed and blocked assets back together.
File
- src/
Render/ HtmlResponseAttachmentsProcessor.php, line 277
Class
- HtmlResponseAttachmentsProcessor
- Processes attachments of HTML responses.
Namespace
Drupal\cookie_content_blocker\RenderCode
private function markAssetsAsBlocked(array $assets) : array {
return array_map(function ($asset) {
$asset['preprocess'] = $asset['cache'] = FALSE;
$asset['is_blocked'] = TRUE;
return $asset;
}, $assets);
}