mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add scope selection on accompanying course
This commit is contained in:
@@ -2,16 +2,21 @@
|
||||
|
||||
namespace Chill\MainBundle\Security\Resolver;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
|
||||
/**
|
||||
* Interface to implement to define a ScopeResolver.
|
||||
*/
|
||||
interface ScopeResolverInterface
|
||||
{
|
||||
/**
|
||||
* Return true if this resolve is able to decide "something" on this entity.
|
||||
*/
|
||||
public function supports($entity, ?array $options = []): bool;
|
||||
|
||||
/**
|
||||
* @param $entity
|
||||
* @param array|null $options
|
||||
* Will return the scope for the entity
|
||||
*
|
||||
* @return Scope|array|Scope[]
|
||||
*/
|
||||
public function resolveScope($entity, ?array $options = []);
|
||||
@@ -19,12 +24,12 @@ interface ScopeResolverInterface
|
||||
|
||||
/**
|
||||
* Return true if the entity is concerned by scope, false otherwise.
|
||||
*
|
||||
* @param $entity
|
||||
* @param array|null $options
|
||||
* @return bool
|
||||
*/
|
||||
public function isConcerned($entity, ?array $options = []): bool;
|
||||
|
||||
/**
|
||||
* get the default priority for this resolver. Resolver with an higher priority will be
|
||||
* queried first.
|
||||
*/
|
||||
public static function getDefaultPriority(): int;
|
||||
}
|
||||
|
Reference in New Issue
Block a user