paginationRender(...), [ 'needs_environment' => true, 'is_safe' => ['html'], ] ), ]; } public function getName() { return 'chill_pagination'; } public function paginationRender( Environment $env, PaginatorInterface $paginator, $template = '@ChillMain/Pagination/long.html.twig' ) { $t = match ($template) { 'long' => self::LONG_TEMPLATE, 'short' => self::SHORT_TEMPLATE, default => $template, }; return $env->render($t, [ 'paginator' => $paginator, 'current' => $paginator->getCurrentPage()->getNumber(), ]); } }