class PreSendPdfEvent in Entity Print 8
The PreSendPdfEvent class.
Hierarchy
- class \Drupal\entity_print\Event\PdfEventBase extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\entity_print\Event\PreSendPdfEvent
Expanded class hierarchy of PreSendPdfEvent
2 files declare their use of PreSendPdfEvent
- EntityPrintPdfBuilder.php in src/
EntityPrintPdfBuilder.php - TestEngineConfigurationAlter.php in tests/
modules/ entity_print_test/ src/ EventSubscriber/ TestEngineConfigurationAlter.php
File
- src/
Event/ PreSendPdfEvent.php, line 11
Namespace
Drupal\entity_print\EventView source
class PreSendPdfEvent extends PdfEventBase {
/**
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $entity;
/**
* PreSendPdfEvent constructor.
*
* @param \Drupal\entity_print\Plugin\PdfEngineInterface $pdf_engine
* The PDF Engine.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to print.
*/
public function __construct(PdfEngineInterface $pdf_engine, EntityInterface $entity) {
parent::__construct($pdf_engine);
$this->entity = $entity;
}
/**
* Gets the entity that is being printed to PDF.
*
* @return \Drupal\Core\Entity\EntityInterface
* The content entity.
*/
public function getEntity() {
return $this->entity;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PdfEventBase:: |
protected | property | ||
PdfEventBase:: |
public | function | Gets the PDF Engine plugin that will print the PDF. | |
PreSendPdfEvent:: |
protected | property | ||
PreSendPdfEvent:: |
public | function | Gets the entity that is being printed to PDF. | |
PreSendPdfEvent:: |
public | function |
PreSendPdfEvent constructor. Overrides PdfEventBase:: |