original_string: protected function setCurrentModelClass()
      {
          if ( ! $this->router->isModelRoute()) {
              $this->currentModelClass = null;
              return $this;
          }
  
          $info = $this->repository->getByKey(
              $this->router->getModuleKeyForCurrentRoute()
          );
  
          if ($info) {
              $this->currentModelClass = $info->original_model ?: $info->model;
          } else {
              $this->currentModelClass = null;
          }
  
          $this->activeModelClass = $this->currentModelClass;
  
          return $this;
      }
code: protected function setCurrentModelClass()
      {
          if ( ! $this->router->isModelRoute()) {
              $this->currentModelClass = null;
              return $this;
          }
  
          $info = $this->repository->getByKey(
              $this->router->getModuleKeyForCurrentRoute()
          );
  
          if ($info) {
              $this->currentModelClass = $info->original_model ?: $info->model;
          } else {
              $this->currentModelClass = null;
          }
  
          $this->activeModelClass = $this->currentModelClass;
  
          return $this;
      }
code_tokens: protected function setCurrentModelClass ( ) { if ( ! $ this -> router -> isModelRoute ( ) ) { $ this -> currentModelClass = null ; return $ this ; } $ info = $ this -> repository -> getByKey ( $ this -> router -> getModuleKeyForCurrentRoute ( ) ) ; if ( $ info ) { $ this -> currentModelClass = $ info -> original_model ? : $ info -> model ; } else { $ this -> currentModelClass = null ; } $ this -> activeModelClass = $ this -> currentModelClass ; return $ this ; }
docstring: Sets the active and current model class based on the current request.
docstring_tokens: Sets the active and current model class based on the current request .