original_string: protected function getReferencesForModelKeys(array $keys, $targetModel = null)
      {
          $keys = array_filter($keys);
  
          if ( ! count($keys)) {
              return [];
          }
  
          $referenceData = $this->getReferenceDataProvider()->getForModelClassByType(
              $this->model,
              'form.field',
              $this->field->key(),
              $targetModel
          );
  
          if ( ! $referenceData) {
              return [];
          }
  
          $references = [];
  
          foreach ($keys as $key) {
              $references[ $key ] = $this->getReferenceRepository()
                  ->getReferenceForModelMetaReferenceByKey($referenceData, $key);
          }
  
          return $references;
      }
code: protected function getReferencesForModelKeys(array $keys, $targetModel = null)
      {
          $keys = array_filter($keys);
  
          if ( ! count($keys)) {
              return [];
          }
  
          $referenceData = $this->getReferenceDataProvider()->getForModelClassByType(
              $this->model,
              'form.field',
              $this->field->key(),
              $targetModel
          );
  
          if ( ! $referenceData) {
              return [];
          }
  
          $references = [];
  
          foreach ($keys as $key) {
              $references[ $key ] = $this->getReferenceRepository()
                  ->getReferenceForModelMetaReferenceByKey($referenceData, $key);
          }
  
          return $references;
      }
code_tokens: protected function getReferencesForModelKeys ( array $ keys , $ targetModel = null ) { $ keys = array_filter ( $ keys ) ; if ( ! count ( $ keys ) ) { return [ ] ; } $ referenceData = $ this -> getReferenceDataProvider ( ) -> getForModelClassByType ( $ this -> model , 'form.field' , $ this -> field -> key ( ) , $ targetModel ) ; if ( ! $ referenceData ) { return [ ] ; } $ references = [ ] ; foreach ( $ keys as $ key ) { $ references [ $ key ] = $ this -> getReferenceRepository ( ) -> getReferenceForModelMetaReferenceByKey ( $ referenceData , $ key ) ; } return $ references ; }
docstring: Returns references for model keys as an array keyed per model key.
  
  @param mixed[]     $keys
  @param string|null $targetModel  the nested model class, if multiple model definitions set
  @return string[] associative
docstring_tokens: Returns references for model keys as an array keyed per model key .