TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Fluid\ViewHelpers\Uri\PageViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Uri\PageViewHelper:
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface

Public Member Functions

 render ($pageUid=null, array $additionalParams=[], $pageType=0, $noCache=false, $noCacheHash=false, $section='', $linkAccessRestrictedPages=false, $absolute=false, $addQueryString=false, array $argumentsToBeExcludedFromQueryString=[], $addQueryStringMethod=null)
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 isEscapingInterceptorEnabled ()
 
 setViewHelperNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
 
 setRenderChildrenClosure (\Closure $renderChildrenClosure)
 
 initializeArgumentsAndRender ()
 
 initialize ()
 
 renderChildren ()
 
 prepareArguments ()
 
 validateArguments ()
 
 initializeArguments ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 resetState ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 

Static Public Member Functions

static renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Detailed Description

A view helper for creating URIs to TYPO3 pages.

= Examples =

<f:uri.page>page link</f:uri.page> <output> index.php?id=123 (depending on the current page and your TS configuration) </output>

<f:uri.page pageUid="1" additionalParams="{foo: 'bar'}" /> <output> index.php?id=1&foo=bar (depending on your TS configuration) </output>

<f:uri.page pageUid="1" additionalParams="{extension_key: {foo: 'bar'}}" /> <output> index.php?id=1&extension_key[foo]=bar (depending on your TS configuration) </output>

Definition at line 49 of file PageViewHelper.php.

Member Function Documentation

◆ render()

TYPO3\CMS\Fluid\ViewHelpers\Uri\PageViewHelper::render (   $pageUid = null,
array  $additionalParams = [],
  $pageType = 0,
  $noCache = false,
  $noCacheHash = false,
  $section = '',
  $linkAccessRestrictedPages = false,
  $absolute = false,
  $addQueryString = false,
array  $argumentsToBeExcludedFromQueryString = [],
  $addQueryStringMethod = null 
)
Parameters
int | NULL$pageUidtarget PID
array$additionalParamsquery parameters to be attached to the resulting URI
int$pageTypetype of the target page. See typolink.parameter
bool$noCacheset this to disable caching for the target page. You should not need this.
bool$noCacheHashset this to suppress the cHash query parameter created by TypoLink. You should not need this.
string$sectionthe anchor to be added to the URI
bool$linkAccessRestrictedPagesIf set, links pointing to access restricted pages will still link to the page even though the page cannot be accessed.
bool$absoluteIf set, the URI of the rendered link is absolute
bool$addQueryStringIf set, the current query parameters will be kept in the URI
array$argumentsToBeExcludedFromQueryStringarguments to be removed from the URI. Only active if $addQueryString = TRUE
string$addQueryStringMethodSet which parameters will be kept. Only active if $addQueryString = TRUE
Returns
string Rendered page URI

Definition at line 65 of file PageViewHelper.php.

References TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\buildRenderChildrenClosure().

◆ renderStatic()

static TYPO3\CMS\Fluid\ViewHelpers\Uri\PageViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static
Parameters
array$arguments
callable$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string

Definition at line 92 of file PageViewHelper.php.

References TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface\getControllerContext().