Adds an event subscriber.
The subscriber is asked for all the events he is interested in and added as a listener for these events.
@api
EventSubscriberInterface $subscriber The subscriber.:
Overrides EventDispatcherInterface::addSubscriber
public function addSubscriber(EventSubscriberInterface $subscriber) {
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}