public function relatedCollection($resourceModel, RelatedRepository $repository)
    {
        if ($repository instanceof ConditionAwareRepository) {
            $this->applyFilters($this->filters, $this->filterFactory, $repository);
        }

        if ($repository instanceof OneToOneRelationRepository) {
            return $repository->getOne($resourceModel);
        }

        if ($repository instanceof OneToManyRelationRepository) {
            return $repository->getMany($resourceModel);
        }

        throw new \InvalidArgumentException('Repository ' . get_class($repository) . ' has no relation repository interface defined.');
    }
public function relatedCollection($resourceModel, RelatedRepository $repository)
    {
        if ($repository instanceof ConditionAwareRepository) {
            $this->applyFilters($this->filters, $this->filterFactory, $repository);
        }

        if ($repository instanceof OneToOneRelationRepository) {
            return $repository->getOne($resourceModel);
        }

        if ($repository instanceof OneToManyRelationRepository) {
            return $repository->getMany($resourceModel);
        }

        throw new \InvalidArgumentException('Repository ' . get_class($repository) . ' has no relation repository interface defined.');
    }
public function relatedCollection ( $ resourceModel , RelatedRepository $ repository ) { if ( $ repository instanceof ConditionAwareRepository ) { $ this -> applyFilters ( $ this -> filters , $ this -> filterFactory , $ repository ) ; } if ( $ repository instanceof OneToOneRelationRepository ) { return $ repository -> getOne ( $ resourceModel ) ; } if ( $ repository instanceof OneToManyRelationRepository ) { return $ repository -> getMany ( $ resourceModel ) ; } throw new \ InvalidArgumentException ( 'Repository ' . get_class ( $ repository ) . ' has no relation repository interface defined.' ) ; }
relationship index request

@param Model|mixed $resourceModel
@param RelatedRepository $repository
@return Model|Model[]|Collection|mixed
relationship index request