2 namespace TYPO3\CMS\Impexp\Tests\Functional\Export;
45 $this->setUpBackendUserFromFixture(1);
47 $GLOBALS[
'TBE_STYLES'][
'spriteIconApi'][
'iconsAvailable'] = array();
49 \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
52 $this->export->init(0,
'export');
63 protected function setPageTree($pidToStart, $depth = 1)
65 $permsClause =
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
69 $tree->init(
'AND ' . $permsClause);
70 $tree->tree[] = array(
'row' => $pidToStart);
71 $tree->buffer_idH = array();
73 $tree->getTree($pidToStart, $depth,
'');
76 $idH[$pidToStart][
'uid'] = $pidToStart;
77 if (!empty($tree->buffer_idH)) {
78 $idH[$pidToStart][
'subrow'] = $tree->buffer_idH;
81 $this->export->setPageTree($idH);
93 foreach (
$GLOBALS[
'TCA'] as $table => $value) {
94 if ($table !=
'pages' && (in_array($table, $tables) || in_array(
'_ALL', $tables))) {
95 if (
$GLOBALS[
'BE_USER']->check(
'tables_select', $table) && !
$GLOBALS[
'TCA'][$table][
'ctrl'][
'is_static']) {
96 $orderBy =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'sortby'] ?
'ORDER BY ' .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'sortby'] :
$GLOBALS[
'TCA'][$table][
'ctrl'][
'default_sortby'];
97 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
102 $GLOBALS[
'TYPO3_DB']->stripOrderBy($orderBy)
104 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
105 $this->export->export_addRecord($table, $row);