TYPO3 CMS  TYPO3_6-2
Tables.php
Go to the documentation of this file.
1 <?php
3 
22 class Tables {
23 
33  public function getTables($format, $withAllOption = 0, $startUid, $depth = 0) {
34  $deletedRecordsTotal = 0;
35  $tables = array();
36  foreach ($GLOBALS['TCA'] as $tableName => $_) {
38  if ($deletedField) {
39  // Determine whether the table has deleted records:
40  $deletedCount = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $tableName, $deletedField . '<>0');
41  if ($deletedCount) {
42  $deletedDataObject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Recycler\\Domain\\Model\\DeletedRecords');
43  $deletedData = $deletedDataObject->loadData($startUid, $tableName, $depth)->getDeletedRows();
44  if (isset($deletedData[$tableName])) {
45  if ($deletedRecordsInTable = count($deletedData[$tableName])) {
46  $deletedRecordsTotal += $deletedRecordsInTable;
47  $tables[] = array(
48  $tableName,
49  $deletedRecordsInTable,
50  $tableName,
51  \TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String($GLOBALS['LANG']->sL($GLOBALS['TCA'][$tableName]['ctrl']['title']))
52  );
53  }
54  }
55  }
56  }
57  }
58  $jsonArray = $tables;
59  if ($withAllOption) {
60  array_unshift($jsonArray, array(
61  '',
62  $deletedRecordsTotal,
63  '',
64  $GLOBALS['LANG']->sL('LLL:EXT:recycler/mod1/locallang.xlf:label_alltables')
65  ));
66  }
67  $output = json_encode($jsonArray);
68  return $output;
69  }
70 
71 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getTables($format, $withAllOption=0, $startUid, $depth=0)
Definition: Tables.php:33