* @author Timo Hund */ class StartNewSearchViewHelper extends AbstractUriViewHelper { /** * Initializes the arguments */ public function initializeArguments() { parent::initializeArguments(); $this->registerArgument('queryString', 'string', 'The query string', false, ''); } /** * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return string */ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $queryString = $arguments['queryString']; $previousRequest = static::getUsedSearchRequestFromRenderingContext($renderingContext); $uri = self::getSearchUriBuilder($renderingContext)->getNewSearchUri($previousRequest, $queryString); return $uri; } }