* @author Timo Hund */ class GroupItemPageViewHelper extends AbstractUriViewHelper { /** * Initializes the arguments */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('page', 'int', 'The page', false, 0); $this->registerArgument('groupItem', GroupItem::class, 'The group item', true); } /** * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return string */ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $page = $arguments['page']; $groupItem = $arguments['groupItem']; $previousRequest = static::getUsedSearchRequestFromRenderingContext($renderingContext); $uri = self::getSearchUriBuilder($renderingContext)->getResultGroupItemPageUri($previousRequest, $groupItem, (int)$page); return $uri; } }