mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Generate a context for docgen, on accompanying period
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Security\Resolver;
|
||||
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
final class ScopeResolverDispatcher
|
||||
{
|
||||
@@ -45,7 +46,13 @@ final class ScopeResolverDispatcher
|
||||
{
|
||||
foreach ($this->resolvers as $resolver) {
|
||||
if ($resolver->supports($entity, $options)) {
|
||||
return $resolver->resolveScope($entity, $options);
|
||||
$scopes = $resolver->resolveScope($entity, $options);
|
||||
|
||||
if ($scopes instanceof Collection) {
|
||||
return $scopes->toArray();
|
||||
}
|
||||
|
||||
return $scopes;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user