original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Inject access denied View Model is response status is 403
  
  @param MvcEvent $event
docstring_tokens: Inject access denied View Model is response status is 403