public function getReferenceForModelMetaReferenceByKey(ModelMetaReferenceInterface $referenceData, $key)
    {
        $query = $this->getQueryBuilderForModelClass($referenceData->model());

        /** @var Model $model */
        $model = $query->find($key);

        if ( ! $model) return false;

        return $this->getReferenceForModelMetaReferenceByModel($referenceData, $model);
    }
public function getReferenceForModelMetaReferenceByKey(ModelMetaReferenceInterface $referenceData, $key)
    {
        $query = $this->getQueryBuilderForModelClass($referenceData->model());

        /** @var Model $model */
        $model = $query->find($key);

        if ( ! $model) return false;

        return $this->getReferenceForModelMetaReferenceByModel($referenceData, $model);
    }
public function getReferenceForModelMetaReferenceByKey ( ModelMetaReferenceInterface $ referenceData , $ key ) { $ query = $ this -> getQueryBuilderForModelClass ( $ referenceData -> model ( ) ) ; /** @var Model $model */ $ model = $ query -> find ( $ key ) ; if ( ! $ model ) return false ; return $ this -> getReferenceForModelMetaReferenceByModel ( $ referenceData , $ model ) ; }
Returns a reference for a model class, by meta reference data.

@param ModelMetaReferenceInterface $referenceData
@param                             $key
@return string|false     false if the model could not be found
Returns a reference for a model class by meta reference data .