Ejemplo n.º 1
0
 /**
  * initialize the local settings
  */
 public function initializeSettings()
 {
     $zipDownloadSettings = $this->configurationBuilder->buildItemListConfiguration()->getZipDownloadSettings();
     if (!array_key_exists('resolution', $zipDownloadSettings)) {
         throw new Exception('Resolution was not defined in zipDownloadSettings', 1367155503);
     }
     $this->resolutionIdentifier = $zipDownloadSettings['resolution'];
     if (!array_key_exists('fileNameFormat', $zipDownloadSettings)) {
         throw new Exception('FileNameFormat was not defined in zipDownloadSettings', 1367155504);
     }
     $this->fileNameFormat = $zipDownloadSettings['fileNameFormat'];
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 protected function getRandomUIDs()
 {
     $itemRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager')->get('Tx_Yag_Domain_Repository_ItemRepository');
     /** @var $itemRepository Tx_Yag_Domain_Repository_ItemRepository */
     $randomItemCount = $this->yagConfigurationBuilder->buildItemListConfiguration()->getItemsPerPage();
     return $itemRepository->getRandomItemUIDs($randomItemCount, $this->yagContext->getGalleryUid(), $this->yagContext->getAlbumUid());
 }