public function ExampleViewsEventSubscribers::postRender in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x examples/ExampleViewsEventSubscribers.php \Drupal\hook_event_dispatcher\ExampleViewsEventSubscribers::postRender()
Post render event handler.
Parameters
\Drupal\views_event_dispatcher\Event\Views\ViewsPostRenderEvent $event: The event.
File
- examples/
ExampleViewsEventSubscribers.php, line 137
Class
- ExampleViewsEventSubscribers
- Class ExampleViewsEventSubscribers.
Namespace
Drupal\hook_event_dispatcherCode
public function postRender(ViewsPostRenderEvent $event) : void {
$cache = $event
->getCache();
// Do something with the cache settings.
$cache->options['results_lifespan'] = 0;
}