centerResolverDispatcher = $centerResolverDispatcher; $this->scopeResolverDispatcher = $scopeResolverDispatcher; } public function getFilters() { return [ new TwigFilter('chill_resolve_center', [$this, 'resolveCenter']), new TwigFilter('chill_resolve_scope', [$this, 'resolveScope']), new TwigFilter('chill_is_scope_concerned', [$this, 'isScopeConcerned']), ]; } /** * @param $entity * * @return bool */ public function isScopeConcerned($entity, ?array $options = []) { return $this->scopeResolverDispatcher->isConcerned($entity, $options); } /** * @param mixed $entity * * @return Center|Center[]|null */ public function resolveCenter($entity, ?array $options = []) { return $this->centerResolverDispatcher->resolveCenters($entity, $options); } /** * @param $entity * * @return array|\Chill\MainBundle\Entity\Scope|\Chill\MainBundle\Entity\Scope[] */ public function resolveScope($entity, ?array $options = []) { return $this->scopeResolverDispatcher->resolveScope(); } }