protected function applyRepositoryContext(
        ModelRepositoryInterface $repository = null,
        ModelInformationInterface $information = null
    ) {
        $repository  = $repository  ?: call_user_func([ $this, 'getModelRepository' ]);
        $information = $information ?: call_user_func([ $this, 'getModelInformation' ]);

        $this->prepareRepositoryContextStrategy($repository, $information)
             ->disableGlobalScopes($repository, $information)
             ->applyIncludesToRepository($repository, $information);

        return $this;
    }
protected function applyRepositoryContext(
        ModelRepositoryInterface $repository = null,
        ModelInformationInterface $information = null
    ) {
        $repository  = $repository  ?: call_user_func([ $this, 'getModelRepository' ]);
        $information = $information ?: call_user_func([ $this, 'getModelInformation' ]);

        $this->prepareRepositoryContextStrategy($repository, $information)
             ->disableGlobalScopes($repository, $information)
             ->applyIncludesToRepository($repository, $information);

        return $this;
    }
protected function applyRepositoryContext ( ModelRepositoryInterface $ repository = null , ModelInformationInterface $ information = null ) { $ repository = $ repository ? : call_user_func ( [ $ this , 'getModelRepository' ] ) ; $ information = $ information ? : call_user_func ( [ $ this , 'getModelInformation' ] ) ; $ this -> prepareRepositoryContextStrategy ( $ repository , $ information ) -> disableGlobalScopes ( $ repository , $ information ) -> applyIncludesToRepository ( $ repository , $ information ) ; return $ this ; }
Applies criteria-based repository context strategies.

If repository or information are not given, they are read from standard
methods: getModelRepository() and getModelInformation respectively.

@param ModelRepositoryInterface|null                   $repository
@param ModelInformationInterface|ModelInformation|null $information
@return $this
Applies criteria - based repository context strategies .