You are here

public function EntityPrintSubscriber::alterCss in Commerce Invoice 8.2

Alter the CSS renderable array and add our CSS.

Parameters

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

File

src/EventSubscriber/EntityPrintSubscriber.php, line 20

Class

EntityPrintSubscriber
Add our CSS for the invoice PDFS.

Namespace

Drupal\commerce_invoice\EventSubscriber

Code

public function alterCss(PrintCssAlterEvent $event) {
  $event
    ->getBuild()['#attached']['library'][] = 'commerce_invoice/entity-print-styling';
}