protected function makeReferenceStrategy(Model $model)
    {
        // Get model information for the model
        $information = $this->getInformationRepository()->getByModel($model);

        // If the model is not part of the CMS, fall back
        if ( ! $information) return null;

        $strategy = $information->reference->strategy;

        if ( ! $strategy) {
            $strategy = config('cms-models.strategies.reference.default-strategy');
        }

        return $this->makeReferenceStrategyInstance($strategy);
    }
protected function makeReferenceStrategy(Model $model)
    {
        // Get model information for the model
        $information = $this->getInformationRepository()->getByModel($model);

        // If the model is not part of the CMS, fall back
        if ( ! $information) return null;

        $strategy = $information->reference->strategy;

        if ( ! $strategy) {
            $strategy = config('cms-models.strategies.reference.default-strategy');
        }

        return $this->makeReferenceStrategyInstance($strategy);
    }
protected function makeReferenceStrategy ( Model $ model ) { // Get model information for the model $ information = $ this -> getInformationRepository ( ) -> getByModel ( $ model ) ; // If the model is not part of the CMS, fall back if ( ! $ information ) return null ; $ strategy = $ information -> reference -> strategy ; if ( ! $ strategy ) { $ strategy = config ( 'cms-models.strategies.reference.default-strategy' ) ; } return $ this -> makeReferenceStrategyInstance ( $ strategy ) ; }
Returns strategy instance for getting reference string.

@param Model $model
@return null|ReferenceStrategyInterface
Returns strategy instance for getting reference string .