original_string: protected function initializeForModelRoute()
      {
          $routeHelper = $this->getRouteHelper();
  
          $this->modelSlug = $routeHelper->getModelSlugForCurrentRoute();
  
          if ( ! $this->modelSlug) {
              throw new RuntimeException("Could not determine model slug for route in request");
          }
  
          $this->modelInformation = $this->getModelInformationRepository()->getByKey($this->modelSlug);
  
          if ( ! $this->modelInformation) {
              throw new RuntimeException(
                  "Could not load information for model slug '{$this->modelSlug}' in request"
              );
          }
  
          return $this;
      }
code: protected function initializeForModelRoute()
      {
          $routeHelper = $this->getRouteHelper();
  
          $this->modelSlug = $routeHelper->getModelSlugForCurrentRoute();
  
          if ( ! $this->modelSlug) {
              throw new RuntimeException("Could not determine model slug for route in request");
          }
  
          $this->modelInformation = $this->getModelInformationRepository()->getByKey($this->modelSlug);
  
          if ( ! $this->modelInformation) {
              throw new RuntimeException(
                  "Could not load information for model slug '{$this->modelSlug}' in request"
              );
          }
  
          return $this;
      }
code_tokens: protected function initializeForModelRoute ( ) { $ routeHelper = $ this -> getRouteHelper ( ) ; $ this -> modelSlug = $ routeHelper -> getModelSlugForCurrentRoute ( ) ; if ( ! $ this -> modelSlug ) { throw new RuntimeException ( "Could not determine model slug for route in request" ) ; } $ this -> modelInformation = $ this -> getModelInformationRepository ( ) -> getByKey ( $ this -> modelSlug ) ; if ( ! $ this -> modelInformation ) { throw new RuntimeException ( "Could not load information for model slug '{$this->modelSlug}' in request" ) ; } return $ this ; }
docstring: Initializes form request and checks context expecting a model route.
  
  @return $this
docstring_tokens: Initializes form request and checks context expecting a model route .