You are here

class PreSendPrintEvent in Entity Print 8.2

The PreSendPrintEvent class.

Hierarchy

Expanded class hierarchy of PreSendPrintEvent

1 file declares its use of PreSendPrintEvent
PrintBuilder.php in src/PrintBuilder.php

File

src/Event/PreSendPrintEvent.php, line 10

Namespace

Drupal\entity_print\Event
View source
class PreSendPrintEvent extends PrintEventBase {

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

  /**
   * PreSendPrintEvent constructor.
   *
   * @param \Drupal\entity_print\Plugin\PrintEngineInterface $print_engine
   *   The Print Engine.
   * @param \Drupal\Core\Entity\EntityInterface[] $entities
   *   The entity to print.
   */
  public function __construct(PrintEngineInterface $print_engine, array $entities) {
    parent::__construct($print_engine);
    $this->entities = $entities;
  }

  /**
   * Gets the entities that is being printed to Print.
   *
   * @return \Drupal\Core\Entity\EntityInterface[]
   *   The content entities.
   */
  public function getEntities() {
    return $this->entities;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PreSendPrintEvent::$entities protected property An array of entities.
PreSendPrintEvent::getEntities public function Gets the entities that is being printed to Print.
PreSendPrintEvent::__construct public function PreSendPrintEvent constructor. Overrides PrintEventBase::__construct
PrintEventBase::$printEngine protected property The print engine plugin.
PrintEventBase::getPrintEngine public function Gets the Print Engine plugin that will print the Print.