TYPO3 CMS  TYPO3_6-2
CategoryBasedFileCollection.php
Go to the documentation of this file.
1 <?php
3 
22 
26  static protected $storageTableName = 'sys_file_collection';
27 
31  static protected $type = 'categories';
32 
36  static protected $itemsCriteriaField = 'category';
37 
41  protected $itemTableName = 'sys_category';
42 
48  public function loadContents() {
49 
50  $resource = $this->getDatabaseConnection()->exec_SELECT_mm_query(
51  'sys_file_metadata.file',
52  'sys_category',
53  'sys_category_record_mm',
54  'sys_file_metadata',
55  'AND sys_category.uid=' . (int)$this->getItemsCriteria() .
56  ' AND sys_category_record_mm.tablenames = \'sys_file_metadata\''
57  );
58 
60  if ($resource) {
61  while (($record = $this->getDatabaseConnection()->sql_fetch_assoc($resource)) !== FALSE) {
62  $this->add($resourceFactory->getFileObject((int)$record['file']));
63  }
64  $this->getDatabaseConnection()->sql_free_result($resource);
65  }
66  }
67 
73  protected function getDatabaseConnection() {
74  return $GLOBALS['TYPO3_DB'];
75  }
76 
77 }
add(\TYPO3\CMS\Core\Resource\FileInterface $data)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]