resolvers as $resolver) { if ($resolver->supports($entity, $options)) { return $resolver->isConcerned($entity, $options); } } return false; } /** * @param mixed $entity * @param array|null $options * @return iterable|Scope|null */ public function resolveScope(mixed $entity, ?array $options = []): iterable|\Chill\MainBundle\Entity\Scope|null { foreach ($this->resolvers as $resolver) { if ($resolver->supports($entity, $options)) { $scopes = $resolver->resolveScope($entity, $options); if ($scopes instanceof Collection) { return $scopes->toArray(); } return $scopes; } } return null; } }