TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper:
TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface Tx_Fluid_ViewHelpers_Widget_PaginateViewHelper

Public Member Functions

 render (\TYPO3\CMS\Extbase\Persistence\QueryResultInterface $objects, $as, array $configuration=array('itemsPerPage'=> 10, 'insertAbove'=> FALSE, 'insertBelow'=> TRUE, 'maximumNumberOfLinks'=> 99))
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
 injectAjaxWidgetContextHolder (\TYPO3\CMS\Fluid\Core\Widget\AjaxWidgetContextHolder $ajaxWidgetContextHolder)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 initializeArgumentsAndRender ()
 
 setChildNodes (array $childNodes)
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 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 ()
 

Protected Attributes

 $controller
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
 $controller
 
 $ajaxWidget = FALSE
 
 $objectManager
 
 $extensionService
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = NULL
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = TRUE
 

Additional Inherited Members

- 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)
 
- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
 getWidgetConfiguration ()
 
 initiateSubRequest ()
 
- 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 ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 

Detailed Description

This ViewHelper renders a Pagination of objects.

= Examples =

<f:widget.paginate objects="{blogs}" as="paginatedBlogs"> use {paginatedBlogs} as you used {blogs} before, most certainly inside a <f:for> loop. </f:widget.paginate>

<f:widget.paginate objects="{blogs}" as="paginatedBlogs" configuration="{itemsPerPage: 5, insertAbove: 1, insertBelow: 0, maximumNumberOfLinks: 10}"> use {paginatedBlogs} as you used {blogs} before, most certainly inside a <f:for> loop. </f:widget.paginate>

= Performance characteristics =

In the above examples, it looks like {blogs} contains all Blog objects, thus you might wonder if all objects were fetched from the database. However, the blogs are NOT fetched from the database until you actually use them, so the paginate ViewHelper will adjust the query sent to the database and receive only the small subset of objects. So, there is no negative performance overhead in using the Paginate Widget.

Definition at line 53 of file PaginateViewHelper.php.

Member Function Documentation

◆ render()

TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper::render ( \TYPO3\CMS\Extbase\Persistence\QueryResultInterface  $objects,
  $as,
array  $configuration = array('itemsPerPage' => 10, 'insertAbove' => FALSE, 'insertBelow' => TRUE, 'maximumNumberOfLinks' => 99) 
)
Parameters
\TYPO3\CMS\Extbase\Persistence\QueryResultInterface$objects
string$as
array$configuration
Returns
string

Definition at line 67 of file PaginateViewHelper.php.

References TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper\initiateSubRequest().

Member Data Documentation

◆ $controller

TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper::$controller
protected

Definition at line 59 of file PaginateViewHelper.php.