コード例 #1
0
 /**
  *
  * @param TYPO3\CMS\Core\Resource\File $media
  */
 private function initFalFile($media)
 {
     $this->record = $media->getProperties();
     $this->uid = $media->getUid();
     $this->record['fal_file'] = '1';
     // Das wird per TS ausgewertet. Die UID ist KEINE Referenz
     $this->record['uid_local'] = $media->getUid();
     $this->record['file_path'] = $media->getPublicUrl();
     $this->record['file_abs_url'] = tx_rnbase_util_Misc::getIndpEnv('TYPO3_SITE_URL') . $this->record['file_path'];
 }
コード例 #2
0
ファイル: FileTest.php プロジェクト: khanhdeux/typo3test
 /**
  * @test
  */
 public function updatePropertiesDiscardsUidIfAlreadySet()
 {
     $fixture = new \TYPO3\CMS\Core\Resource\File(array('uid' => 1, 'identifier' => '/test'), $this->storageMock);
     $fixture->updateProperties(array('uid' => 3));
     $this->assertEquals(1, $fixture->getUid());
 }