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


PHP ResourceStorage::getFolderList方法代码示例

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


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

示例1: folderListingsDoNotContainHiddenFoldersByDefault

 /**
  * Test if the default filters filter out hidden folders (like .htaccess)
  *
  * @test
  */
 public function folderListingsDoNotContainHiddenFoldersByDefault()
 {
     $this->addToMount(array('someFolder' => array(), '.someHiddenFolder' => array()));
     $this->prepareFixture();
     $this->fixture->resetFileAndFolderNameFiltersToDefault();
     $folderList = $this->fixture->getFolderList('/');
     $this->assertContains('someFolder', array_keys($folderList));
     $this->assertNotContains('.someHiddenFolder', array_keys($folderList));
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:14,代码来源:StorageTest.php

示例2: getSubfolders

 /**
  * Returns a list of all subfolders
  *
  * @return \TYPO3\CMS\Core\Resource\Folder[]
  */
 public function getSubfolders()
 {
     $folderObjects = array();
     $folderArray = $this->storage->getFolderList($this->identifier);
     if (count($folderArray) > 0) {
         /** @var $factory \TYPO3\CMS\Core\Resource\ResourceFactory */
         $factory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
         // TODO this will not work with non-hierarchical storages
         // -> the identifier for subfolders is not composed of the
         // current item's identifier for these
         foreach ($folderArray as $folder) {
             $folderObjects[] = $factory->createFolderObject($this->storage, $this->identifier . $folder['name'] . '/', $folder['name']);
         }
     }
     return $folderObjects;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:21,代码来源:Folder.php

示例3: getSubfolders

 /**
  * Returns a list of subfolders
  *
  * @param integer $start The item to start at
  * @param integer $numberOfItems The number of items to return
  * @param integer $filterMode The filter mode to use for the file list.
  * @return \TYPO3\CMS\Core\Resource\Folder[]
  */
 public function getSubfolders($start = 0, $numberOfItems = 0, $filterMode = self::FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS)
 {
     list($backedUpFilters, $useFilters) = $this->prepareFiltersInStorage($filterMode);
     $folderObjects = array();
     $folderArray = $this->storage->getFolderList($this->identifier, $start, $numberOfItems, $useFilters);
     if (count($folderArray) > 0) {
         /** @var $factory \TYPO3\CMS\Core\Resource\ResourceFactory */
         $factory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
         // TODO this will not work with non-hierarchical storages
         // -> the identifier for subfolders is not composed of the
         // current item's identifier for these
         foreach ($folderArray as $folder) {
             $folderObjects[$folder['name']] = $factory->createFolderObject($this->storage, $this->identifier . $folder['name'] . '/', $folder['name']);
         }
     }
     $this->restoreBackedUpFiltersInStorage($backedUpFilters);
     return $folderObjects;
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:26,代码来源:Folder.php


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