final class PrintEvents in Entity Print 8.2
The events related to Print Engines.
Hierarchy
- class \Drupal\entity_print\Event\PrintEvents
Expanded class hierarchy of PrintEvents
6 files declare their use of PrintEvents
- AssetCollector.php in src/
Asset/ AssetCollector.php - EntityPrintPluginManager.php in src/
Plugin/ EntityPrintPluginManager.php - PostRenderSubscriber.php in src/
EventSubscriber/ PostRenderSubscriber.php - PrintBuilder.php in src/
PrintBuilder.php - RendererBase.php in src/
Renderer/ RendererBase.php
File
- src/
Event/ PrintEvents.php, line 8
Namespace
Drupal\entity_print\EventView source
final class PrintEvents {
/**
* Name of the event fired when retrieving a Print engine configuration.
*
* This event allows you to change the configuration of a Print Engine
* implementation right before the plugin manager creates the plugin instance.
*
* @Event
*
* @see \Symfony\Component\EventDispatcher\GenericEvent
*/
const CONFIGURATION_ALTER = 'entity_print.print_engine.configuration_alter';
/**
* Name of the event fired right before the Print is sent to the page.
*
* At this point, the HTML has been rendered and added as a page on the Print
* engine. The only thing left to happen is generate the filename and stream
* the Print data to the page.
*
* @Event
*
* @see \Drupal\entity_print\Event\PreSendPrintEvent
*/
const PRE_SEND = 'entity_print.print_engine.pre_send';
/**
* Name of the event fired when building CSS assets.
*
* This event allows custom code to add their own CSS assets. Note the
* recommended way is to manage CSS from your theme.
*
* @link https://www.drupal.org/node/2430561#from-your-theme @endlink
*
* @code
* $event->getBuild()['#attached']['library'][] = 'module/library';
* @endcode
*
* @Event
*
* @see \Drupal\entity_print\Event\PrintCssAlterEvent
*/
const CSS_ALTER = 'entity_print.print.css_alter';
/**
* This event is fired right after the HTML has been generated.
*
* Any manipulations to the HTML string can happen here. You should normally
* avoid using this event and try and use the appropriate theme templates. We
* currently use this event to fix a core bug with absolute URLs.
*
* @Event
*
* @see \Drupal\entity_print\Event\PrintHtmlAlterEvent
*/
const POST_RENDER = 'entity_print.print.html_alter';
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrintEvents:: |
constant | Name of the event fired when retrieving a Print engine configuration. | ||
PrintEvents:: |
constant | Name of the event fired when building CSS assets. | ||
PrintEvents:: |
constant | This event is fired right after the HTML has been generated. | ||
PrintEvents:: |
constant | Name of the event fired right before the Print is sent to the page. |