public function injectAccessDeniedViewModel(MvcEvent $event)
    {
        $this->config($event);
        
        $result = $event->getResult();
        
        if ($result instanceof ResponseInterface) {
            return;
        }
        
        $response = $event->getResponse();
        
        if ($response->getStatusCode() != 403) {
            return;
        }
        
        $model = new ViewModel();
        $model->setTemplate($this->template);
        
        if ($this->renderLayout == true) {
            $layout = $event->getViewModel();
            $layout->addChild($model);
        } else {
            $model->setTerminal(true);
            $event->setViewModel($model);
        }
    }