‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Utility\ListUtility Class Reference

Static Public Member Functions

static array< string|int, resolveSpecialFolderNames(array $folders) { $resolvedFolders=[];foreach( $folders as $folder) { $name=self::resolveSpecialFolderName( $folder);$resolvedFolders[ $name]=$folder;} return $resolvedFolders;} public static function resolveSpecialFolderName(Folder $folder):string { $lang=$GLOBALS[ 'LANG'];$name=$folder-> getName ()

Public Attributes

 $role = $folder->getRole()
if($role !==FolderInterface::ROLE_DEFAULT) return $name

Detailed Description

Utility function for working with resource-lists

Definition at line 25 of file ListUtility.php.

Member Function Documentation

◆ getName()

static array<string|int, resolveSpecialFolderNames(array $folders) { $resolvedFolders = []; foreach ($folders as $folder) { $name = self::resolveSpecialFolderName($folder); $resolvedFolders[$name] = $folder; } return $resolvedFolders; } public static function resolveSpecialFolderName(Folder $folder): string { $lang = $GLOBALS['LANG']; $name = $folder-> TYPO3\CMS\Core\Resource\Utility\ListUtility::getName ( )

Resolve special folders (by their role) into localised string

‪array<string|int, Folder> Folders using the Folder name (with or without role) as key

Member Data Documentation

◆ $name

if ( $role !==FolderInterface::ROLE_DEFAULT) return TYPO3\CMS\Core\Resource\Utility\ListUtility::$name

Definition at line 62 of file ListUtility.php.

◆ $role

TYPO3\CMS\Core\Resource\Utility\ListUtility::$role = $folder->getRole()

Definition at line 53 of file ListUtility.php.