public AjaxResponseSubscriber::onRequest(GetResponseEvent $event)
Sets the AJAX parameter from the current request.
\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The response event, which contains the current request.
public function onRequest(GetResponseEvent $event) { // Pass to the Html class that the current request is an Ajax request. if ($event->getRequest()->request->get(static::AJAX_REQUEST_PARAMETER)) { Html::setIsAjax(TRUE); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!AjaxResponseSubscriber.php/function/AjaxResponseSubscriber::onRequest/8.1.x