48 $recordIdentifier = $this->cObj->currentRecord;
49 list($tableName) = explode(
':', $recordIdentifier);
51 $position = strpos($currentWatcherValue,
'/' . $recordIdentifier);
53 $recordData = $this->
filterFields($tableName, $this->cObj->data);
54 $this->records[$recordIdentifier] = $recordData;
56 if ($currentWatcherValue === $recordIdentifier) {
57 $this->structure[$recordIdentifier] = $recordData;
58 $this->structurePaths[$recordIdentifier] = array(array());
59 } elseif(!empty($position)) {
60 $levelIdentifier = substr($currentWatcherValue, 0, $position);
61 $this->
addToStructure($levelIdentifier, $recordIdentifier, $recordData);
65 public function addFileData($content, array $configuration = NULL) {
66 $currentFile = $this->cObj->getCurrentFile();
68 if ($currentFile instanceof \
TYPO3\CMS\Core\Resource\File) {
69 $tableName =
'sys_file';
70 } elseif ($currentFile instanceof \
TYPO3\CMS\Core\Resource\FileReference) {
71 $tableName =
'sys_file_reference';
76 $recordData = $this->
filterFields($tableName, $currentFile->getProperties());
77 $recordIdentifier = $tableName .
':' . $currentFile->getUid();
78 $this->records[$recordIdentifier] = $recordData;
81 $levelIdentifier = rtrim($currentWatcherValue,
'/');
82 $this->
addToStructure($levelIdentifier, $recordIdentifier, $recordData);
91 $recordData = array_intersect_key(
98 protected function addToStructure($levelIdentifier, $recordIdentifier, array $recordData) {
99 $steps = explode(
'/', $levelIdentifier);
103 foreach ($steps as $step) {
104 list($identifier, $fieldName) = explode(
'.', $step);
128 'structure' => $this->structure,
129 'structurePaths' => $this->structurePaths,
130 'records' => $this->records,
133 $as = (!empty($configuration[
'as']) ? $configuration[
'as'] : NULL);
142 if (!isset($this->tableFields) && !empty($this->
getFrontendController()->tmpl->setup[
'config.'][
'watcher.'][
'tableFields.'])) {
143 $this->tableFields = $this->
getFrontendController()->tmpl->setup[
'config.'][
'watcher.'][
'tableFields.'];
144 foreach ($this->tableFields as &$fieldList) {
150 return (!empty($this->tableFields[$tableName]) ? $this->tableFields[$tableName] : array());
157 $watcherValue = NULL;
161 return $watcherValue;
168 return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
169 'TYPO3\\CMS\\Core\\Tests\\Functional\\Framework\\Frontend\\Renderer'
addFileData($content, array $configuration=NULL)
filterFields($tableName, array $recordData)
attachSection($content, array $configuration=NULL)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
addToStructure($levelIdentifier, $recordIdentifier, array $recordData)
getTableFields($tableName)
addRecordData($content, array $configuration=NULL)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]