You are here

class PdfHtmlAlterEvent in Entity Print 8

Hierarchy

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

Expanded class hierarchy of PdfHtmlAlterEvent

2 files declare their use of PdfHtmlAlterEvent
ContentEntityRenderer.php in src/Renderer/ContentEntityRenderer.php
PostRenderSubscriber.php in src/EventSubscriber/PostRenderSubscriber.php

File

src/Event/PdfHtmlAlterEvent.php, line 7

Namespace

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

  /**
   * The HTML string.
   *
   * @var string
   */
  protected $html;

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

  /**
   * PdfHtmlAlterEvent constructor.
   *
   * @param string $html
   *   The generated HTML.
   * @param array $entities
   *   An array of entities we're rendering.
   */
  public function __construct(&$html, $entities) {
    $this->html =& $html;
    $this->entities = $entities;
  }

  /**
   * Gets the rendered HTML.
   *
   * @return string
   *   The HTML string.
   */
  public function &getHtml() {
    return $this->html;
  }

  /**
   * 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
PdfHtmlAlterEvent::$entities protected property An array of entities we're rendering.
PdfHtmlAlterEvent::$html protected property The HTML string.
PdfHtmlAlterEvent::getEntities public function Gets the entities being rendered.
PdfHtmlAlterEvent::getHtml public function Gets the rendered HTML.
PdfHtmlAlterEvent::__construct public function PdfHtmlAlterEvent constructor.