You are here

public function TestEngineConfigurationAlter::alterCss in Entity Print 8

Same name and namespace in other branches
  1. 8.2 tests/modules/entity_print_test/src/EventSubscriber/TestEngineConfigurationAlter.php \Drupal\entity_print_test\EventSubscriber\TestEngineConfigurationAlter::alterCss()

Alter the CSS renderable array and add our CSS.

Parameters

\Drupal\entity_print\Event\PdfCssAlterEvent $event: The event object.

File

tests/modules/entity_print_test/src/EventSubscriber/TestEngineConfigurationAlter.php, line 33

Class

TestEngineConfigurationAlter
The TestEngineConfigurationAlter class.

Namespace

Drupal\entity_print_test\EventSubscriber

Code

public function alterCss(PdfCssAlterEvent $event) {
  $event
    ->getBuild()['#attached']['library'][] = 'entity_print_test_theme/module';
}