TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
PaginateViewHelper Class Reference
Inheritance diagram for PaginateViewHelper:
AbstractWidgetViewHelper AbstractViewHelper ChildNodeAccessInterface

Public Member Functions

 render ($objects, $as, array $configuration=array('itemsPerPage'=> 10, 'insertAbove'=> false, 'insertBelow'=> true, 'maximumNumberOfLinks'=> 99))
 
- Public Member Functions inherited from 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 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 AbstractWidgetViewHelper
 $controller
 
 $ajaxWidget = false
 
 $objectManager
 
 $extensionService
 
- Protected Attributes inherited from AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractViewHelper
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Member Functions inherited from AbstractWidgetViewHelper
 getWidgetConfiguration ()
 
 initiateSubRequest ()
 

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 57 of file Widget/PaginateViewHelper.php.

Member Function Documentation

render (   $objects,
  $as,
array  $configuration = array('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99) 
)
Parameters
QueryResultInterface | ObjectStorage | array$objects
string$as
array$configuration
Returns
string

Definition at line 71 of file Widget/PaginateViewHelper.php.

References AbstractWidgetViewHelper\initiateSubRequest().

Member Data Documentation

$controller
protected

Definition at line 63 of file Widget/PaginateViewHelper.php.