TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
class.browse_links.php
Go to the documentation of this file.
1
<?php
7
class
localPageTree
extends
\TYPO3\CMS\Backend\Tree\View\BrowseTreeView
{
8
15
public
$ext_showPageId
= FALSE;
16
22
public
function
__construct
() {
23
$this->
determineScriptUrl
();
24
$this->
init
();
25
$this->clause =
' AND doktype!='
.
\TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER
.
$this->clause
;
26
}
27
37
public
function
wrapTitle
(
$title
, $v, $ext_pArrPages =
''
) {
38
if
($this->
ext_isLinkable
($v[
'doktype'
], $v[
'uid'
])) {
39
$aOnClick =
'return link_typo3Page(\''
. $v[
'uid'
] .
'\'
);
';
40
return '
<a href=
"#"
onclick=
"' . htmlspecialchars($aOnClick) . '"
>
' . $title . '
</a>
';
41
} else {
42
return '
<span style=
"color: #666666;"
>
' . $title . '
</span>
';
43
}
44
}
45
53
public function printTree($treeArr = '
') {
54
$titleLen = (int)$GLOBALS['
BE_USER
']->uc['
titleLen
'];
55
if (!is_array($treeArr)) {
56
$treeArr = $this->tree;
57
}
58
$out = '
';
59
$c = 0;
60
foreach ($treeArr as $k => $v) {
61
$c++;
62
$bgColorClass = ($c + 1) % 2 ? '
bgColor
' : '
bgColor-10
';
63
if ($GLOBALS['
SOBE
']->browser->curUrlInfo['
act
'] == '
page
' && $GLOBALS['
SOBE
']->browser->curUrlInfo['
pageid
'] == $v['
row
']['
uid
'] && $GLOBALS['
SOBE
']->browser->curUrlInfo['
pageid
']) {
64
$arrCol = '
<td><img
' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['
BACK_PATH
'], '
gfx/blinkarrow_right.gif
', '
width=
"5"
height=
"9"
') . '
class
=
"c-blinkArrowR"
alt=
""
/></td>
';
65
$bgColorClass = '
bgColor4
';
66
} else {
67
$arrCol = '
<td></td>
';
68
}
69
$aOnClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
act=
' . $GLOBALS['
SOBE
']->browser->act . '
&mode=
' . $GLOBALS['
SOBE
']->browser->mode . '
&expandPage=
' . $v['
row
']['
uid
']) . '
);
';
70
$cEbullet = $this->ext_isLinkable($v['
row
']['
doktype
'], $v['
row
']['
uid
']) ? '
<a href=
"#"
onclick=
"' . htmlspecialchars($aOnClick) . '"
><img
' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['
BACK_PATH
'], '
gfx/ol/arrowbullet.gif
', '
width=
"18"
height=
"16"
') . '
alt=
""
/></a>
' : '
';
71
$out .= '
72
<tr
class
=
"' . $bgColorClass . '"
>
73
<td nowrap=
"nowrap"
' . ($v['
row
']['
_CSSCLASS
'] ? '
class
=
"' . $v['row']['_CSSCLASS'] . '"
' : '
') . '
>
' . $v['
HTML
'] . $this->wrapTitle($this->getTitleStr($v['
row
'], $titleLen), $v['
row
'], $this->ext_pArrPages) . '
</td>
' . $arrCol . '
<td>
' . $cEbullet . '
</td>
74
</tr>
';
75
}
76
$out = '
77
78
79
<!--
80
Navigation Page Tree:
81
-->
82
<table border=
"0"
cellpadding=
"0"
cellspacing=
"0"
id
=
"typo3-tree"
>
83
' . $out . '
84
</table>
';
85
return $out;
86
}
87
96
public function ext_isLinkable($doktype, $uid) {
97
if ($uid && $doktype < 199) {
98
return TRUE;
99
}
100
}
101
111
public function PM_ATagWrap($icon, $cmd, $bMark = '
') {
112
$name = '
';
113
if ($bMark) {
114
$anchor = '
#
' . $bMark;
115
$name = '
name=
' . $bMark;
116
}
117
$aOnClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
PM=
' . $cmd) . '
,
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($anchor) . '
);
';
118
return '
<a href=
"#"
' . htmlspecialchars($name) . '
onclick=
"' . htmlspecialchars($aOnClick) . '"
>
' . $icon . '
</a>
';
119
}
120
129
public function wrapIcon($icon, $row) {
130
if ($this->ext_showPageId) {
131
$icon .= '
[
' . $row['
uid
'] . '
]
';
132
}
133
return $icon;
134
}
135
136
}
137
143
class TBE_PageTree extends localPageTree {
144
153
public function ext_isLinkable($doktype, $uid) {
154
return TRUE;
155
}
156
166
public function wrapTitle($title, $v, $ext_pArrPages) {
167
if ($ext_pArrPages) {
168
$ficon = \TYPO3\CMS\Backend\Utility\IconUtility::getIcon('
pages
', $v);
169
$onClick = '
return
insertElement(\
'pages\', \''
. $v[
'uid'
] .
'\'
, \
'db\', '
. \
TYPO3
\CMS\Core\Utility\GeneralUtility::quoteJSvalue($v[
'title'
]) .
', \'\', \'\', \''
. $ficon .
'\'
,\
'\'
,1);
';
170
} else {
171
$onClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
act=
' . $GLOBALS['
SOBE
']->browser->act . '
&mode=
' . $GLOBALS['
SOBE
']->browser->mode . '
&expandPage=
' . $v['
uid
']) . '
);
';
172
}
173
return '
<a href=
"#"
onclick=
"' . htmlspecialchars($onClick) . '"
>
' . $title . '
</a>
';
174
}
175
176
}
177
185
class localFolderTree extends \TYPO3\CMS\Backend\Tree\View\FolderTreeView {
186
190
public $ext_IconMode = 1;
191
197
public function __construct() {
198
$this->determineScriptUrl();
199
parent::__construct();
200
}
201
210
public function wrapTitle($title, \TYPO3\CMS\Core\Resource\Folder $folderObject) {
211
if ($this->ext_isLinkable($folderObject)) {
212
$aOnClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
act=
' . $GLOBALS['
SOBE
']->browser->act . '
&mode=
' . $GLOBALS['
SOBE
']->browser->mode . '
&expandFolder=
' . rawurlencode($folderObject->getCombinedIdentifier())) . '
);
';
213
return '
<a href=
"#"
onclick=
"' . htmlspecialchars($aOnClick) . '"
>
' . $title . '
</a>
';
214
} else {
215
return '
<span
class
=
"typo3-dimmed"
>
' . $title . '
</span>
';
216
}
217
}
218
226
public function ext_isLinkable(\TYPO3\CMS\Core\Resource\Folder $folderObject) {
227
if (strstr($folderObject->getIdentifier(), '
_recycler_
') || strstr($folderObject->getIdentifier(), '
_temp_
')) {
228
return FALSE;
229
} else {
230
return TRUE;
231
}
232
}
233
244
public function PM_ATagWrap($icon, $cmd, $bMark = '
') {
245
$name = $anchor = '
';
246
if ($bMark) {
247
$anchor = '
#
' . $bMark;
248
$name = '
name=
"' . $bMark . '"
';
249
}
250
$aOnClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
PM=
' . $cmd) . '
,
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($anchor) . '
);
';
251
return '
<a href=
"#"
' . htmlspecialchars($name) . '
onclick=
"' . htmlspecialchars($aOnClick) . '"
>
' . $icon . '
</a>
';
252
}
253
254
}
255
261
class TBE_FolderTree extends localFolderTree {
262
263
// If file-drag mode is set, temp and recycler folders are filtered out.
267
public $ext_noTempRecyclerDirs = 0;
268
276
public function ext_isLinkable($folderObject) {
277
if ($this->ext_noTempRecyclerDirs && (substr($folderObject->getIdentifier(), -7) == '
_temp_/
' || substr($folderObject->getIdentifier(), -11) == '
_recycler_/
')) {
278
return FALSE;
279
} else {
280
return TRUE;
281
}
282
}
283
292
public function wrapTitle($title, $folderObject) {
293
if ($this->ext_isLinkable($folderObject)) {
294
$aOnClick = '
return
jumpToUrl(
' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($this->getThisScript() . '
act=
' . $GLOBALS['
SOBE
']->browser->act . '
&mode=
' . $GLOBALS['
SOBE
']->browser->mode . '
&expandFolder=
' . rawurlencode($folderObject->getCombinedIdentifier())) . '
);
';
295
return '
<a href=
"#"
onclick=
"' . htmlspecialchars($aOnClick) . '"
>
' . $title . '
</a>
';
296
} else {
297
return '
<span
class
=
"typo3-dimmed"
>
' . $title . '
</span>
';
298
}
299
}
300
301
}
TYPO3\CMS\Backend\Tree\View\BrowseTreeView
Definition:
BrowseTreeView.php:25
TYPO3
localPageTree
Definition:
class.browse_links.php:7
localPageTree\ext_isLinkable
ext_isLinkable($doktype, $uid)
Definition:
class.browse_links.php:96
localPageTree\__construct
__construct()
Definition:
class.browse_links.php:22
localPageTree\$ext_showPageId
$ext_showPageId
Definition:
class.browse_links.php:15
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$title
$title
Definition:
AbstractTreeView.php:72
TYPO3\CMS\Backend\Tree\View\BrowseTreeView\init
init($clause='', $orderByFields='')
Definition:
BrowseTreeView.php:36
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$clause
$clause
Definition:
AbstractTreeView.php:132
localPageTree\wrapTitle
wrapTitle($title, $v, $ext_pArrPages='')
Definition:
class.browse_links.php:37
TYPO3\CMS\Frontend\Page\PageRepository\DOKTYPE_RECYCLER
const DOKTYPE_RECYCLER
Definition:
PageRepository.php:166
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\determineScriptUrl
determineScriptUrl()
Definition:
AbstractTreeView.php:306
typo3
class.browse_links.php
Generated on Wed Aug 7 2019 09:52:17 for TYPO3 CMS by
1.8.13