original_string: protected function modifyRelationQueryForContext(Model $model, $query)
      {
          /** @var Relation $relation */
          $information = $this->getInformationRepository()->getByModel($model);
  
          if ( ! $information) {
              return $query;
          }
  
          // Deal with global scopes, if any
          $disableScopes = $information->meta->disable_global_scopes;
  
          if (true === $disableScopes || is_array($disableScopes)) {
              $query->withoutGlobalScopes(
                  true === $disableScopes ? null : $disableScopes
              );
          }
  
          // Apply repository context, if any
          $strategy = $information->meta->repository_strategy;
  
          if ($strategy) {
              $strategy = $this->resolveContextStrategy($strategy);
  
              if ($strategy) {
                  $query = $strategy->apply($query, $information);
              }
          }
  
          return $query;
      }
code: protected function modifyRelationQueryForContext(Model $model, $query)
      {
          /** @var Relation $relation */
          $information = $this->getInformationRepository()->getByModel($model);
  
          if ( ! $information) {
              return $query;
          }
  
          // Deal with global scopes, if any
          $disableScopes = $information->meta->disable_global_scopes;
  
          if (true === $disableScopes || is_array($disableScopes)) {
              $query->withoutGlobalScopes(
                  true === $disableScopes ? null : $disableScopes
              );
          }
  
          // Apply repository context, if any
          $strategy = $information->meta->repository_strategy;
  
          if ($strategy) {
              $strategy = $this->resolveContextStrategy($strategy);
  
              if ($strategy) {
                  $query = $strategy->apply($query, $information);
              }
          }
  
          return $query;
      }
code_tokens: protected function modifyRelationQueryForContext ( Model $ model , $ query ) { /** @var Relation $relation */ $ information = $ this -> getInformationRepository ( ) -> getByModel ( $ model ) ; if ( ! $ information ) { return $ query ; } // Deal with global scopes, if any $ disableScopes = $ information -> meta -> disable_global_scopes ; if ( true === $ disableScopes || is_array ( $ disableScopes ) ) { $ query -> withoutGlobalScopes ( true === $ disableScopes ? null : $ disableScopes ) ; } // Apply repository context, if any $ strategy = $ information -> meta -> repository_strategy ; if ( $ strategy ) { $ strategy = $ this -> resolveContextStrategy ( $ strategy ) ; if ( $ strategy ) { $ query = $ strategy -> apply ( $ query , $ information ) ; } } return $ query ; }
docstring: Modifies the relation query according to the model's CMS information.
  
  @param Model            $model
  @param Builder|Relation $query
  @return Builder
docstring_tokens: Modifies the relation query according to the model s CMS information .