TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
typo3
sysext
beuser
Classes
ViewHelpers
Display
PagesViewHelper.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Beuser\ViewHelpers\Display;
3
4
/*
5
* This file is part of the TYPO3 CMS project.
6
*
7
* It is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License, either version 2
9
* of the License, or any later version.
10
*
11
* For the full copyright and license information, please read the
12
* LICENSE.txt file that was distributed with this source code.
13
*
14
* The TYPO3 project - inspiring people to share!
15
*/
16
17
use
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
;
18
use
TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface
;
19
use
TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
;
20
25
class
PagesViewHelper
extends
AbstractViewHelper
implements
CompilableInterface
26
{
33
public
function
render
($uids =
''
)
34
{
35
return
static::renderStatic(
36
array(
37
'uids'
=> $uids,
38
),
39
$this->
buildRenderChildrenClosure
(),
40
$this->renderingContext
41
);
42
}
43
51
public
static
function
renderStatic
(array
$arguments
, \Closure
$renderChildrenClosure
,
RenderingContextInterface
$renderingContext
)
52
{
53
$uids = $arguments[
'uids'
];
54
if
(!$uids) {
55
return
''
;
56
}
57
58
$content =
''
;
59
$res =
$GLOBALS
[
'TYPO3_DB'
]->exec_SELECTquery(
60
'uid, title'
,
61
'pages'
,
62
'uid IN ('
.
$GLOBALS
[
'TYPO3_DB'
]->cleanIntList($uids) .
')'
,
63
'uid ASC'
64
);
65
while
($row =
$GLOBALS
[
'TYPO3_DB'
]->sql_fetch_assoc($res)) {
66
$content .=
'<li>'
. htmlspecialchars($row[
'title'
]) .
' ['
. htmlspecialchars($row[
'uid'
]) .
']</li>'
;
67
}
68
$GLOBALS
[
'TYPO3_DB'
]->sql_free_result($res);
69
return
'<ul>'
. $content .
'</ul>'
;
70
}
71
}
Generated on Wed Nov 11 2015 01:52:01 for TYPO3 by
1.8.3