‪TYPO3CMS  10.4
PaginateViewHelper.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
67 {
71  protected ‪$controller;
72 
77  {
78  $this->controller = ‪$controller;
79  }
80 
86  public function ‪initializeArguments()
87  {
88  parent::initializeArguments();
89  $this->registerArgument('objects', 'mixed', 'Object', true);
90  $this->registerArgument('as', 'string', 'as', true);
91  $this->registerArgument('configuration', 'array', 'configuration', false, ['itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99]);
92  }
93 
98  public function ‪render()
99  {
100  $objects = $this->arguments['objects'];
101 
102  if (!($objects instanceof ‪QueryResultInterface || $objects instanceof ‪ObjectStorage || is_array($objects))) {
103  throw new \UnexpectedValueException('Supplied file object type ' . get_class($objects) . ' must be QueryResultInterface or ObjectStorage or be an array.', 1454510731);
104  }
105  return $this->‪initiateSubRequest();
106  }
107 }
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper
Definition: PaginateViewHelper.php:67
‪TYPO3\CMS\Fluid\ViewHelpers\Widget
Definition: AutocompleteViewHelper.php:16
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper\injectPaginateController
‪injectPaginateController(PaginateController $controller)
Definition: PaginateViewHelper.php:75
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper\initializeArguments
‪initializeArguments()
Definition: PaginateViewHelper.php:85
‪TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
Definition: AbstractWidgetViewHelper.php:30
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper\$controller
‪TYPO3 CMS Fluid ViewHelpers Widget Controller PaginateController $controller
Definition: PaginateViewHelper.php:70
‪TYPO3\CMS\Extbase\Persistence\QueryResultInterface
Definition: QueryResultInterface.php:22
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController
Definition: PaginateController.php:27
‪TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper\render
‪string render()
Definition: PaginateViewHelper.php:97
‪TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper\initiateSubRequest
‪TYPO3 CMS Extbase Mvc ResponseInterface initiateSubRequest()
Definition: AbstractWidgetViewHelper.php:213