public function AttachedProcessor::processElement in Cookie Content Blocker 8
Processes the element.
Parameters
array $element: The element to process.
Return value
array The processed element.
Overrides ElementProcessorBase::processElement
File
- src/
ElementProcessor/ AttachedProcessor.php, line 43
Class
- AttachedProcessor
- Class AttachedProcessor.
Namespace
Drupal\cookie_content_blocker\ElementProcessorCode
public function processElement(array $element) : array {
foreach ($element['#attached']['library'] as $library) {
$this->libraryManager
->addBlockedLibrary($library);
}
return $element;
}