You are here

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\ElementProcessor

Code

public function processElement(array $element) : array {
  foreach ($element['#attached']['library'] as $library) {
    $this->libraryManager
      ->addBlockedLibrary($library);
  }
  return $element;
}