protected FormAjaxSubscriber::getFormAjaxException(\Exception $e)
Extracts a form AJAX exception.
Parameters
\Exception $e: A generic exception that might contain a form AJAX exception.
Return value
\Drupal\Core\Form\FormAjaxException|null Either the form AJAX exception, or NULL if none could be found.
File
- core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php, line 121
Class
- FormAjaxSubscriber
- Wraps AJAX form submissions that are triggered via an exception.
Namespace
Drupal\Core\Form\EventSubscriber
Code
protected function getFormAjaxException(\Exception $e) { $exception = NULL; while ($e) { if ($e instanceof FormAjaxException) { $exception = $e; break; } $e = $e->getPrevious(); } return $exception; }
Please login to continue.