PaginateViewHelper::injectController()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace SKYFILLERS\SfFilecollectionGallery\ViewHelpers;
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
16
/**
17
 * This widget is a copy of the fluid paginate widget. Now it's possible to
18
 * use arrays with paginate, not only query results.
19
 *
20
 * @author     Paul Beck <[email protected]>
21
 * @author     Armin Ruediger Vieweg <[email protected]>
22
 * @copyright  2011 Copyright belongs to the respective authors
23
 */
24
class PaginateViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper {
25
26
	/**
27
	 * The pagination Controller
28
	 *
29
	 * @var \SKYFILLERS\SfFilecollectionGallery\Controller\PaginateController
30
	 */
31
	protected $controller;
32
33
	/**
34
	 * Injection of widget controller
35
	 *
36
	 * @param \SKYFILLERS\SfFilecollectionGallery\Controller\PaginateController $controller
37
	 *
38
	 * @return void
39
	 */
40
	public function injectController(\SKYFILLERS\SfFilecollectionGallery\Controller\PaginateController $controller) {
41
		$this->controller = $controller;
42
	}
43
44
	/**
45
	 * The render method of widget
46
	 *
47
	 * @param mixed $objects \TYPO3\CMS\ExtBase\Persistence\QueryResultInterface,
48
	 *        \TYPO3\CMS\ExtBase\Persistence\ObjectStorage Object or array
49
	 * @param string $as Render object as
50
	 * @param array $configuration The configuration
51
	 *
52
	 * @return string
53
	 */
54
	public function render($objects, $as, array $configuration = array('itemsPerPage' => 10,
55
		'insertAbove' => FALSE, 'insertBelow' => TRUE)) {
56
		return $this->initiateSubRequest();
57
	}
58
}