TYPO3CMS
9.5
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
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
ExportPageTreeView.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Impexp\View
;
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\Backend\Tree\View\BrowseTreeView
;
18
use
TYPO3\CMS\Backend\Utility\BackendUtility
;
19
use
TYPO3\CMS\Core\Imaging\Icon
;
20
use
TYPO3\CMS\Core\Imaging\IconFactory
;
21
use
TYPO3\CMS\Core\Type\Bitmask\Permission
;
22
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
23
28
class
ExportPageTreeView
extends
BrowseTreeView
29
{
33
public
function
__construct
()
34
{
35
parent::__construct();
36
$this->
init
();
37
}
38
48
public
function
wrapTitle
(
$title
, $row,
$bank
= 0)
49
{
50
return
trim(
$title
) ===
''
?
'<em>['
. htmlspecialchars($this->
getLanguageService
()->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title'
)) .
']</em>'
: htmlspecialchars(
$title
);
51
}
52
62
public
function
PM_ATagWrap
($icon, $cmd, $bMark =
''
, $isOpen =
false
)
63
{
64
return
$icon;
65
}
66
74
public
function
wrapIcon
($icon, $row)
75
{
76
return
$icon;
77
}
78
86
public
function
ext_tree
($pid,
$clause
=
''
)
87
{
88
// Initialize:
89
$this->
init
(
' AND '
. $this->BE_USER->getPagePermsClause(
Permission::PAGE_SHOW
) .
$clause
);
90
// Get stored tree structure:
91
$this->stored = unserialize($this->BE_USER->uc[
'browseTrees'
][
'browsePages'
], [
'allowed_classes'
=>
false
]);
92
$treeArr = [];
93
$idx = 0;
94
// Set first:
95
$this->bank = $idx;
96
$isOpen = $this->stored[$idx][$pid] ||
$this->expandFirst
;
97
// save ids
98
$curIds =
$this->ids
;
99
$this->
reset
();
100
$this->ids = $curIds;
101
if
($pid > 0) {
102
$rootRec =
BackendUtility::getRecordWSOL
(
'pages'
, $pid);
103
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
104
$firstHtml = $iconFactory->getIconForRecord(
'pages'
, $rootRec,
Icon::SIZE_SMALL
)->render();
105
}
else
{
106
$rootRec = [
107
'title'
=>
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'sitename'
],
108
'uid'
=> 0
109
];
110
$firstHtml = $this->
getRootIcon
($rootRec);
111
}
112
$this->tree[] = [
'HTML'
=> $firstHtml,
'row'
=> $rootRec,
'hasSub'
=> $isOpen];
113
if
($isOpen) {
114
// Set depth:
115
if
($this->addSelfId) {
116
$this->ids[] = $pid;
117
}
118
$this->
getTree
($pid, 999,
''
);
119
$idH = [];
120
$idH[$pid][
'uid'
] = $pid;
121
if
(!empty($this->buffer_idH)) {
122
$idH[$pid][
'subrow'
] =
$this->buffer_idH
;
123
}
124
$this->buffer_idH = $idH;
125
}
126
// Add tree:
127
return
array_merge($treeArr, $this->tree);
128
}
129
}
TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
const SIZE_SMALL
Definition:
Icon.php:29
TYPO3\CMS\Impexp\View\ExportPageTreeView\__construct
__construct()
Definition:
ExportPageTreeView.php:33
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$clause
string $clause
Definition:
AbstractTreeView.php:118
TYPO3\CMS\Core\Imaging\Icon
Definition:
Icon.php:25
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$title
string $title
Definition:
AbstractTreeView.php:73
TYPO3\CMS\Impexp\View\ExportPageTreeView
Definition:
ExportPageTreeView.php:29
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$ids
array $ids
Definition:
AbstractTreeView.php:189
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$buffer_idH
array $buffer_idH
Definition:
AbstractTreeView.php:204
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$expandFirst
bool $expandFirst
Definition:
AbstractTreeView.php:38
TYPO3\CMS\Core\Imaging\IconFactory
Definition:
IconFactory.php:31
TYPO3\CMS\Core\Type\Bitmask\Permission
Definition:
Permission.php:23
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\reset
reset()
Definition:
AbstractTreeView.php:327
TYPO3\CMS\Impexp\View\ExportPageTreeView\ext_tree
array ext_tree($pid, $clause='')
Definition:
ExportPageTreeView.php:86
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getRootIcon
string getRootIcon($rec)
Definition:
AbstractTreeView.php:637
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\$bank
int $bank
Definition:
AbstractTreeView.php:240
TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
const PAGE_SHOW
Definition:
Permission.php:32
TYPO3\CMS\Impexp\View\ExportPageTreeView\wrapTitle
string wrapTitle($title, $row, $bank=0)
Definition:
ExportPageTreeView.php:48
TYPO3\CMS\Backend\Utility\BackendUtility
Definition:
BackendUtility.php:72
TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL
static array getRecordWSOL( $table, $uid, $fields=' *', $where='', $useDeleteClause=true, $unsetMovePointers=false)
Definition:
BackendUtility.php:174
TYPO3\CMS\Backend\Tree\View\BrowseTreeView\init
init($clause='', $orderByFields='')
Definition:
BrowseTreeView.php:79
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getLanguageService
LanguageService getLanguageService()
Definition:
AbstractTreeView.php:1057
TYPO3\CMS\Impexp\View\ExportPageTreeView\wrapIcon
string wrapIcon($icon, $row)
Definition:
ExportPageTreeView.php:74
TYPO3\CMS\Backend\Tree\View\BrowseTreeView
Definition:
BrowseTreeView.php:28
$GLOBALS
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition:
ext_localconf.php:5
TYPO3\CMS\Backend\Tree\View\AbstractTreeView\getTree
int getTree($uid, $depth=999, $depthData='')
Definition:
AbstractTreeView.php:723
TYPO3\CMS\Impexp\View\ExportPageTreeView\PM_ATagWrap
string PM_ATagWrap($icon, $cmd, $bMark='', $isOpen=false)
Definition:
ExportPageTreeView.php:62
TYPO3\CMS\Core\Utility\GeneralUtility
Definition:
GeneralUtility.php:45
TYPO3\CMS\Impexp\View
Definition:
ExportPageTreeView.php:2
doxygen
typo3
sysext
impexp
Classes
View
ExportPageTreeView.php
Generated on Tue Oct 5 2021 01:57:48 for TYPO3CMS by
1.8.18