当前位置: 首页>>代码示例>>PHP>>正文


PHP ResourceFactory::getDefaultStorage方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Resource\ResourceFactory::getDefaultStorage方法的典型用法代码示例。如果您正苦于以下问题:PHP ResourceFactory::getDefaultStorage方法的具体用法?PHP ResourceFactory::getDefaultStorage怎么用?PHP ResourceFactory::getDefaultStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Resource\ResourceFactory的用法示例。


在下文中一共展示了ResourceFactory::getDefaultStorage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: downloadRegistrationsCsv

 /**
  * Initiates the CSV downloads for registrations of the given event uid
  *
  * @param int $eventUid EventUid
  * @param array $settings Settings
  *
  * @throws \RuntimeException RuntimeException
  * @return void
  */
 public function downloadRegistrationsCsv($eventUid, $settings = array())
 {
     $storage = $this->resourceFactory->getDefaultStorage();
     if ($storage === NULL) {
         throw new RuntimeException('Could not get the default storage', 1475590001);
     }
     $registrations = $this->exportRegistrationsCsv($eventUid, $settings);
     $tempFolder = $storage->getFolder('_temp_');
     $tempFile = $storage->createFile('sf_events_export.csv', $tempFolder);
     $tempFile->setContents($registrations);
     $storage->dumpFileContents($tempFile, TRUE, 'registrations_' . date('dmY_His') . '.csv');
 }
开发者ID:AlexPixelant,项目名称:sf_event_mgt,代码行数:21,代码来源:ExportService.php

示例2: downloadiCalendarFile

 /**
  * Initiates the ICS download for the given event
  *
  * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event The event
  *
  * @throws \RuntimeException Exception
  *
  * @return void
  */
 public function downloadiCalendarFile(\DERHANSEN\SfEventMgt\Domain\Model\Event $event)
 {
     $storage = $this->resourceFactory->getDefaultStorage();
     if ($storage === NULL) {
         throw new \RuntimeException('Could not get the default storage', 1475590001);
     }
     $icalContent = $this->getICalendarContent($event);
     $tempFolder = $storage->getFolder('_temp_');
     $tempFile = $storage->createFile('event.ics', $tempFolder);
     $tempFile->setContents($icalContent);
     $storage->dumpFileContents($tempFile, TRUE, 'event_' . $event->getUid() . '.ics');
 }
开发者ID:phathoang,项目名称:sf_event_mgt,代码行数:21,代码来源:ICalendarService.php

示例3: getCategoryImageFolder

 /**
  * Get Category Image folder
  *
  * @return \TYPO3\CMS\Core\Resource\Folder|void
  * @throws \Exception
  */
 protected function getCategoryImageFolder()
 {
     if ($this->categoryImageFolder === null) {
         $storage = $this->resourceFactory->getDefaultStorage();
         if (!$storage) {
             throw new \Exception('No default storage set!');
         }
         try {
             $this->categoryImageFolder = $storage->getFolder(self::FOLDER_CATEGORY_IMAGES);
         } catch (\TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException $exception) {
             $this->categoryImageFolder = $storage->createFolder(self::FOLDER_CATEGORY_IMAGES);
         }
     }
     return $this->categoryImageFolder;
 }
开发者ID:kalypso63,项目名称:news,代码行数:21,代码来源:class.ext_update.php


注:本文中的TYPO3\CMS\Core\Resource\ResourceFactory::getDefaultStorage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。