public function getRoute(): ?RouteInterface
    {
        if (!is_null($this->getApp())) {
            return $this->getApp()->getService('routing')->getCurrentRoute();
        }

        return null;
    }