Пример #1
0
 /**
  * Returns a where clause to find a file in database
  *
  * @param File $file
  *
  * @return string
  */
 protected function getWhereClauseForFile(File $file)
 {
     if ((int) $file->_getPropertyRaw('uid') > 0) {
         $where = 'uid=' . (int) $file->getUid();
     } else {
         $where = sprintf('storage=%u AND identifier LIKE %s', (int) $file->getStorage()->getUid(), $this->getDatabaseConnection()->fullQuoteStr($file->_getPropertyRaw('identifier'), $this->table));
     }
     return $where;
 }
 /**
  * get the file data as array
  * 
  * @param \TYPO3\CMS\Core\Resource\File $resourceObject
  * 
  * @return array
  */
 protected function getFileData($resourceObject)
 {
     $fileData = array('identifier' => $resourceObject->getIdentifier(), 'modDate' => $resourceObject->_getPropertyRaw('modification_date'), 'extension' => $resourceObject->getExtension());
     return $fileData;
 }