public function getLayoutView()
    {
        $currentRequest = $this->requestStack->getCurrentRequest();
        $masterRequest = $this->requestStack->getMasterRequest();

        if (!$currentRequest instanceof Request || !$masterRequest instanceof Request) {
            return null;
        }

        if ($masterRequest->attributes->has('ngbmExceptionLayoutView')) {
            if ($currentRequest !== $masterRequest || !$masterRequest->attributes->has('ngbmLayoutView')) {
                return $masterRequest->attributes->get('ngbmExceptionLayoutView');
            }
        }

        return $masterRequest->attributes->get('ngbmLayoutView');
    }