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\EventView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PdfHtmlAlterEvent:: |
protected | property | An array of entities we're rendering. | |
PdfHtmlAlterEvent:: |
protected | property | The HTML string. | |
PdfHtmlAlterEvent:: |
public | function | Gets the entities being rendered. | |
PdfHtmlAlterEvent:: |
public | function | Gets the rendered HTML. | |
PdfHtmlAlterEvent:: |
public | function | PdfHtmlAlterEvent constructor. |