original_string: public function formFindModelObject($recordId)
      {
          if (!strlen($recordId)) {
              throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.missing_id'));
          }
  
          $model = $this->controller->formCreateModelObject();
  
          /*
           * Prepare query and find model record
           */
          $query = $model->newQuery();
          $this->controller->formExtendQuery($query);
          $result = $query->find($recordId);
  
          if (!$result) {
              throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.not_found', [
                  'class' => get_class($model), 'id' => $recordId
              ]));
          }
  
          $result = $this->controller->formExtendModel($result) ?: $result;
  
          return $result;
      }
code: public function formFindModelObject($recordId)
      {
          if (!strlen($recordId)) {
              throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.missing_id'));
          }
  
          $model = $this->controller->formCreateModelObject();
  
          /*
           * Prepare query and find model record
           */
          $query = $model->newQuery();
          $this->controller->formExtendQuery($query);
          $result = $query->find($recordId);
  
          if (!$result) {
              throw new ApplicationException($this->getLang('not-found-message', 'backend::lang.form.not_found', [
                  'class' => get_class($model), 'id' => $recordId
              ]));
          }
  
          $result = $this->controller->formExtendModel($result) ?: $result;
  
          return $result;
      }
code_tokens: public function formFindModelObject ( $ recordId ) { if ( ! strlen ( $ recordId ) ) { throw new ApplicationException ( $ this -> getLang ( 'not-found-message' , 'backend::lang.form.missing_id' ) ) ; } $ model = $ this -> controller -> formCreateModelObject ( ) ; /*
           * Prepare query and find model record
           */ $ query = $ model -> newQuery ( ) ; $ this -> controller -> formExtendQuery ( $ query ) ; $ result = $ query -> find ( $ recordId ) ; if ( ! $ result ) { throw new ApplicationException ( $ this -> getLang ( 'not-found-message' , 'backend::lang.form.not_found' , [ 'class' => get_class ( $ model ) , 'id' => $ recordId ] ) ) ; } $ result = $ this -> controller -> formExtendModel ( $ result ) ? : $ result ; return $ result ; }
docstring: Finds a Model record by its primary identifier, used by update actions. This logic
  can be changed by overriding it in the controller.
  @param string $recordId
  @return Model
docstring_tokens: Finds a Model record by its primary identifier used by update actions . This logic can be changed by overriding it in the controller .