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;
    }
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;
    }
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 ; }
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
Returns references for model keys as an array keyed per model key .