+ /**
+ * {@inheritdoc}
+ */
+ public static function getSubscribedEvents() {
+ $events[RoutingEvents::DYNAMIC][] = ['routerRebuilding', 3000];
+ $events[RoutingEvents::FINISHED][] = ['routerRebuildFinished', -3000];
+ return $events;
+ }
+
+ /**
+ * Sets the router rebuilding flag to TRUE.
+ */
+ public function routerRebuilding() {
+ $this->rebuilding = TRUE;
+ }
+
+ /**
+ * Sets the router rebuilding flag to FALSE.
+ */
+ public function routerRebuildFinished() {
+ $this->rebuilding = FALSE;
+ }
+