You are here

class PrintCssAlterEvent in Entity Print 8.2

This event allows the CSS libraries to be altered.

Hierarchy

  • class \Drupal\entity_print\Event\PrintCssAlterEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of PrintCssAlterEvent

2 files declare their use of PrintCssAlterEvent
AssetCollector.php in src/Asset/AssetCollector.php
TestEngineConfigurationAlter.php in tests/modules/entity_print_test/src/EventSubscriber/TestEngineConfigurationAlter.php

File

src/Event/PrintCssAlterEvent.php, line 10

Namespace

Drupal\entity_print\Event
View source
class PrintCssAlterEvent extends Event {

  /**
   * The renderable array.
   *
   * @var array
   */
  protected $build;

  /**
   * An array of entities we're rendering.
   *
   * @var \Drupal\Core\Entity\EntityInterface[]
   */
  protected $entities;

  /**
   * PrintCssAlterEvent constructor.
   *
   * @param array $build
   *   The renderable array.
   * @param array $entities
   *   An array of entities we're rendering.
   */
  public function __construct(array &$build, array $entities) {
    $this->build =& $build;
    $this->entities = $entities;
  }

  /**
   * Gets the renderable array by reference if you want to change it.
   *
   * @return array
   *   The renderable array.
   */
  public function &getBuild() {
    return $this->build;
  }

  /**
   * Gets the entities being rendered.
   *
   * @return \Drupal\Core\Entity\EntityInterface[]
   *   An array of entities.
   */
  public function getEntities() {
    return $this->entities;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PrintCssAlterEvent::$build protected property The renderable array.
PrintCssAlterEvent::$entities protected property An array of entities we're rendering.
PrintCssAlterEvent::getBuild public function Gets the renderable array by reference if you want to change it.
PrintCssAlterEvent::getEntities public function Gets the entities being rendered.
PrintCssAlterEvent::__construct public function PrintCssAlterEvent constructor.