original_string: protected function _getOrThrow($id, $conditions = [])
      {
          $this->loadModel('Field.FieldInstances');
          $conditions = array_merge(['id' => $id], $conditions);
          $instance = $this->FieldInstances
              ->find()
              ->where($conditions)
              ->limit(1)
              ->first();
  
          if (!$instance) {
              throw new RecordNotFoundException(__d('field', 'The requested field does not exists.'));
          }
  
          return $instance;
      }
code: protected function _getOrThrow($id, $conditions = [])
      {
          $this->loadModel('Field.FieldInstances');
          $conditions = array_merge(['id' => $id], $conditions);
          $instance = $this->FieldInstances
              ->find()
              ->where($conditions)
              ->limit(1)
              ->first();
  
          if (!$instance) {
              throw new RecordNotFoundException(__d('field', 'The requested field does not exists.'));
          }
  
          return $instance;
      }
code_tokens: protected function _getOrThrow ( $ id , $ conditions = [ ] ) { $ this -> loadModel ( 'Field.FieldInstances' ) ; $ conditions = array_merge ( [ 'id' => $ id ] , $ conditions ) ; $ instance = $ this -> FieldInstances -> find ( ) -> where ( $ conditions ) -> limit ( 1 ) -> first ( ) ; if ( ! $ instance ) { throw new RecordNotFoundException ( __d ( 'field' , 'The requested field does not exists.' ) ) ; } return $ instance ; }
docstring: Gets the given field instance by ID or throw if not exists.
  
  @param int $id Field instance ID
  @param array $conditions Additional conditions for the WHERE query
  @return \Field\Model\Entity\FieldInstance The instance
  @throws \Cake\ORM\Exception\RecordNotFoundException When instance
  was not found
docstring_tokens: Gets the given field instance by ID or throw if not exists .