2 namespace TYPO3\CMS\Fluid\ViewHelpers\Widget;
55 $this->
registerTagAttribute(
'rel',
'string',
'Specifies the relationship between the current document and the linked document');
56 $this->
registerTagAttribute(
'rev',
'string',
'Specifies the relationship between the linked document and the current document');
58 $this->
registerArgument(
'addQueryStringMethod',
'string',
'Method to be used for query string');
72 public function render($action = null,
$arguments = array(), $section =
'', $format =
'', $ajax =
false)
79 $this->tag->addAttribute(
'href', $uri);
81 return $this->tag->render();
91 $action = $this->arguments[
'action'];
93 if ($action === null) {
94 $action = $this->controllerContext->getRequest()->getControllerActionName();
99 $arguments[
'fluid-widget-id'] = $this->controllerContext->getRequest()->getWidgetContext()->getAjaxWidgetIdentifier();
101 return '?' . http_build_query(
$arguments, null,
'&');
111 $uriBuilder = $this->controllerContext->getUriBuilder();
112 $argumentPrefix = $this->controllerContext->getRequest()->getArgumentPrefix();
115 $arguments[
'action'] = $this->arguments[
'action'];
117 if ($this->
hasArgument(
'format') && $this->arguments[
'format'] !==
'') {
118 $arguments[
'format'] = $this->arguments[
'format'];
120 if ($this->
hasArgument(
'addQueryStringMethod') && $this->arguments[
'addQueryStringMethod'] !==
'') {
121 $arguments[
'addQueryStringMethod'] = $this->arguments[
'addQueryStringMethod'];
123 return $uriBuilder->reset()->setArguments(array($argumentPrefix =>
$arguments))->setSection($this->arguments[
'section'])->setAddQueryString(
true)->setAddQueryStringMethod($this->arguments[
'addQueryStringMethod'])->setArgumentsToBeExcludedFromQueryString(array($argumentPrefix,
'cHash'))->setFormat($this->arguments[
'format'])->build();