You are here

interface PrintEngineInterface in Entity Print 8.2

Print engine interface.

Hierarchy

Expanded class hierarchy of PrintEngineInterface

All classes that implement PrintEngineInterface

4 files declare their use of PrintEngineInterface
PreSendPrintEvent.php in src/Event/PreSendPrintEvent.php
PrintBuilder.php in src/PrintBuilder.php
PrintBuilderInterface.php in src/PrintBuilderInterface.php
PrintEventBase.php in src/Event/PrintEventBase.php

File

src/Plugin/PrintEngineInterface.php, line 12

Namespace

Drupal\entity_print\Plugin
View source
interface PrintEngineInterface extends PluginInspectionInterface, PluginFormInterface, ConfigurableInterface {

  /**
   * Gets the export type.
   *
   * @return \Drupal\entity_print\Plugin\ExportTypeInterface
   *   The export type interface.
   */
  public function getExportType();

  /**
   * Add a string of HTML to a new page.
   *
   * @param string $content
   *   The string of HTML to add to a new page.
   *
   * @return $this
   */
  public function addPage($content);

  /**
   * Send the Print contents to the browser.
   *
   * @param string $filename
   *   The filename if we want to force the browser to download.
   * @param bool $force_download
   *   TRUE to attempt to force the browser to download the PDF otherwise FALSE.
   *
   * @throws \Drupal\entity_print\PrintEngineException
   *   Thrown when Print generation fails.
   */
  public function send($filename, $force_download = TRUE);

  /**
   * Gets the binary data for the printed document.
   *
   * @return mixed
   *   The binary data.
   */
  public function getBlob();

  /**
   * Checks if the Print engine dependencies are available.
   *
   * @return bool
   *   TRUE if this implementation has its dependencies met otherwise FALSE.
   */
  public static function dependenciesAvailable();

  /**
   * Gets the installation instructions for this Print engine.
   *
   * @return string
   *   A description of how the user can meet the dependencies for this engine.
   */
  public static function getInstallationInstructions();

  /**
   * Gets the object for this Print engine.
   *
   * Note, it is not advised that you use this method if you want your code to
   * work generically across all print engines.
   *
   * @return object
   *   The implementation specific print object being used.
   */
  public function getPrintObject();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
PrintEngineInterface::addPage public function Add a string of HTML to a new page. 7
PrintEngineInterface::dependenciesAvailable public static function Checks if the Print engine dependencies are available. 7
PrintEngineInterface::getBlob public function Gets the binary data for the printed document. 7
PrintEngineInterface::getExportType public function Gets the export type. 1
PrintEngineInterface::getInstallationInstructions public static function Gets the installation instructions for this Print engine. 1
PrintEngineInterface::getPrintObject public function Gets the object for this Print engine. 7
PrintEngineInterface::send public function Send the Print contents to the browser. 7