コード例 #1
0
ファイル: Media.php プロジェクト: rukzuk/rukzuk
 /**
  * @param \Cms\Data\Media $data
  */
 protected function setValuesFromData(MediaData $data)
 {
     $this->setId($data->getId());
     $this->setWebsiteId($data->getWebsiteId());
     $this->setAlbumId($data->getAlbumId());
     $this->setName($data->getName());
     $this->setExtension($data->getExtension());
     $this->setFilesize($data->getSize());
     $this->setFile($data->getFile());
     $this->setLastModification($data->getLastmod());
     $this->setType($data->getType());
     $this->setDateUploaded($data->getDateUploaded());
     $this->setUrl($data->getUrl());
     $this->setIcon($data->getIconUrl());
     $this->setDownloadUrl($data->getDownloadUrl());
 }
コード例 #2
0
 /**
  * @param \Cms\Data\Media $mediaItem
  *
  * @return MediaInfoStorageItem
  */
 protected function createMediaInfoStorageItem($mediaItem)
 {
     $filePath = $this->mediaDirectory . DIRECTORY_SEPARATOR . $mediaItem->getFile();
     return new MediaInfoStorageItem($mediaItem->getId(), $filePath, $mediaItem->getName(), $mediaItem->getSize(), $mediaItem->getLastUpdate(), $this->getIconHelper()->getIconFilePath($filePath), $this->websiteId);
 }