You are here

protected static function DefaultExceptionSubscriber::getPriority in Drupal 8

Same name in this branch
  1. 8 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getPriority()
  2. 8 core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber::getPriority()
Same name and namespace in other branches
  1. 9 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getPriority()
  2. 10 core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php \Drupal\jsonapi\EventSubscriber\DefaultExceptionSubscriber::getPriority()

Specifies the priority of all listeners in this class.

The default priority is 1, which is very low. To have listeners that have a "first attempt" at handling exceptions return a higher priority.

Return value

int The event priority of this subscriber.

Overrides DefaultExceptionSubscriber::getPriority

File

core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php, line 29

Class

DefaultExceptionSubscriber
Serializes exceptions in compliance with the JSON:API specification.

Namespace

Drupal\jsonapi\EventSubscriber

Code

protected static function getPriority() {
  return parent::getPriority() + 25;
}