You are here

class PdfCssAlterEvent in Entity Print 8

Hierarchy

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

Expanded class hierarchy of PdfCssAlterEvent

2 files declare their use of PdfCssAlterEvent
ContentEntityRenderer.php in src/Renderer/ContentEntityRenderer.php
TestEngineConfigurationAlter.php in tests/modules/entity_print_test/src/EventSubscriber/TestEngineConfigurationAlter.php

File

src/Event/PdfCssAlterEvent.php, line 7

Namespace

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

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

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

  /**
   * PdfCssAlterEvent constructor.
   *
   * @param array $build
   *   The renderable array.
   * @param array $entities
   *   An array of entities we're rendering.
   */
  public function __construct(array &$build, $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
PdfCssAlterEvent::$build protected property The renderable array.
PdfCssAlterEvent::$entities protected property An array of entities we're rendering.
PdfCssAlterEvent::getBuild public function Gets the renderable array by reference if you want to change it.
PdfCssAlterEvent::getEntities public function Gets the entities being rendered.
PdfCssAlterEvent::__construct public function PdfCssAlterEvent constructor.