TYPO3 CMS  TYPO3_6-2
DeletedRecordsController.php
Go to the documentation of this file.
1 <?php
3 
18 
26 
34  public function transform($deletedRowsArray, $totalDeleted) {
35  $total = 0;
36  $jsonArray = array(
37  'rows' => array()
38  );
39  // iterate
40  if (is_array($deletedRowsArray) && count($deletedRowsArray) > 0) {
41  foreach ($deletedRowsArray as $table => $rows) {
42  $total += count($deletedRowsArray[$table]);
43  foreach ($rows as $row) {
44  $backendUser = BackendUtility::getRecord('be_users', $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']], 'username', '', FALSE);
45  $jsonArray['rows'][] = array(
46  'uid' => $row['uid'],
47  'pid' => $row['pid'],
48  'table' => $table,
49  'crdate' => BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
50  'tstamp' => BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
51  'owner' => htmlspecialchars($backendUser['username']),
52  'owner_uid' => $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']],
53  'tableTitle' => \TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title'])),
54  'title' => htmlspecialchars(\TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String(
55  BackendUtility::getRecordTitle($table, $row))),
56  'path' => \TYPO3\CMS\Recycler\Utility\RecyclerUtility::getRecordPath($row['pid'])
57  );
58  }
59  }
60  }
61  $jsonArray['total'] = $totalDeleted;
62  return json_encode($jsonArray);
63  }
64 
65 }
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]