Property | Type | Description | |
---|---|---|---|
$acceptedExtensions | array | Allowed file extensions. | |
$baseLanguage | string | Base language, used for retrieving meta.txt information. | |
$blnShowImages | boolean | Determines if we want to generate images or not. | |
$fallbackLanguage | string | The fallback language, used for retrieving meta.txt information. | |
$foundFiles | array | The files to process in this instance. | |
$metaInformation | array | Meta information for files. | |
$modifiedTime | array | Buffered modification timestamps. | |
$outputBuffer | array | Buffered file information. | |
$pendingIds | array | The pending uuids to collect from DB. | |
$pendingPaths | string[] | The pending paths to collect from DB. | |
$resizeImages | array | Image resize information. | |
$strLightboxId | string | The id to use in lightboxes. | |
$uuidMap | string[] | File id mapping for files. |
Method | Description | |
---|---|---|
__construct ( ) | Create a new instance. | |
addPath ( string $strPath ) : |
Add path to file or folder list. | |
addPathById ( string $strId ) : |
Contao 3 DBAFS Support. | |
convertUuidsOrPathsToMetaModels ( array $values ) : array | Convert an uuid or path to a value to be handled by MetaModels. | |
convertValueToPath ( string $varValue ) : string | Translate the file ID to file path. | |
convertValuesToDatabase ( array $values ) : array | Convert an array of values handled by MetaModels to a value to be stored in the database (array of bin uuid). | |
convertValuesToMetaModels ( array $values ) : array | Convert an array of values stored in the database (array of bin uuid) to a value to be handled by MetaModels. | |
getAcceptedExtensions ( ) : array | Retrieve the allowed file extensions. | |
getBaseLanguage ( ) : string | Retrieve the base language. | |
getFallbackLanguage ( ) : string | Retrieve the fallback language. | |
getFiles ( ) : array | Returns the file list. | |
getLightboxId ( ) : string | Retrieve the lightbox id to use. | |
getResizeImages ( ) : array | Retrieve the resize information. | |
getShowImages ( ) : boolean | Retrieve the flag if images shall be rendered as images. | |
resolveFiles ( ) : |
Process all folders and resolve to a valid file list. | |
setAcceptedExtensions ( string | array $acceptedExtensions ) : void | Set the allowed file extensions. | |
setBaseLanguage ( string $baseLanguage ) : |
Set the base language. | |
setFallbackLanguage ( string $fallbackLanguage ) : |
Set the fallback language. | |
setLightboxId ( string $strLightboxId ) : |
Sets the Id to use for the lightbox. | |
setResizeImages ( array $resizeImages ) : |
Set the resize information. | |
setShowImages ( boolean $blnShowImages ) : |
Set to show/prepare images or not. | |
sortFiles ( string $sortType, array $sortIds = [] ) : array | Sorts the internal file list by a given condition. |
Method | Description | |
---|---|---|
addClasses ( array &$arrSource ) : void | Attach first, last and even/odd classes to the given array. | |
collectFiles ( ) : void | Walks the list of pending folders via ToolboxFile::addPath(). | |
fetchAdditionalData ( ) : void | Walk all files and fetch desired additional information like image sizes etc. | |
getDownloadLink ( string $strFile ) : string | Generate an URL for downloading the given file. | |
remapSorting ( array $arrFiles, array $arrSource ) : array | Maps the sorting from the files to the source. | |
sortByDate ( boolean $blnAscending = true ) : array | Sort by modification time. | |
sortByIdList ( array $sortIds ) : array | Sort by passed id list. | |
sortByName ( boolean $blnAscending = true ) : array | Sort by filename. | |
sortByRandom ( ) : array | Shuffle the file list. |
Method | Description | |
---|---|---|
addFileModels ( FilesModel[] $files, array $skipPaths = [] ) : void | Add the passed file model collection to the current buffer if the extension is allowed. | |
stringToUuid ( string $uuid ) : string | Map a string to it's binary uuid representation. | |
uuidToString ( string $uuid ) : string | Map a binary uuid to it's string representation. |
protected addClasses ( array &$arrSource ) : void | ||
$arrSource | array | The array reference of the array to which the classes shall be added to. |
return | void |
public addPathById ( string $strId ) : |
||
$strId | string | String uuid of the file. |
return |
protected collectFiles ( ) : void | ||
return | void |
public static convertUuidsOrPathsToMetaModels ( array $values ) : array | ||
$values | array | The binary uuids or paths to convert. |
return | array |
public static convertValueToPath ( string $varValue ) : string | ||
$varValue | string | The file id. |
return | string |
public static convertValuesToDatabase ( array $values ) : array | ||
$values | array | The values to convert. |
return | array |
public static convertValuesToMetaModels ( array $values ) : array | ||
$values | array | The binary uuid values to convert. |
return | array |
protected fetchAdditionalData ( ) : void | ||
return | void |
public getAcceptedExtensions ( ) : array | ||
return | array |
public getBaseLanguage ( ) : string | ||
return | string |
protected getDownloadLink ( string $strFile ) : string | ||
$strFile | string | The file that shall be downloaded. |
return | string |
public getFallbackLanguage ( ) : string | ||
return | string |
public getLightboxId ( ) : string | ||
return | string |
public getResizeImages ( ) : array | ||
return | array |
public getShowImages ( ) : boolean | ||
return | boolean |
public resolveFiles ( ) : |
||
return |
public setBaseLanguage ( string $baseLanguage ) : |
||
$baseLanguage | string | The base language to use. |
return |
public setFallbackLanguage ( string $fallbackLanguage ) : |
||
$fallbackLanguage | string | The fallback language to use. |
return |
public setLightboxId ( string $strLightboxId ) : |
||
$strLightboxId | string | The lightbox id to use. |
return |
public setResizeImages ( array $resizeImages ) : |
||
$resizeImages | array | The resize information. Array of 3 elements: 0: Width, 1: Height, 2: Mode. |
return |
public setShowImages ( boolean $blnShowImages ) : |
||
$blnShowImages | boolean | True to show images, false otherwise. |
return |
protected sortByDate ( boolean $blnAscending = true ) : array | ||
$blnAscending | boolean | Flag to determine if sorting shall be applied ascending (default) or descending. |
return | array |
protected sortByIdList ( array $sortIds ) : array | ||
$sortIds | array | The list of binary ids to sort by. |
return | array |
protected sortByName ( boolean $blnAscending = true ) : array | ||
$blnAscending | boolean | Flag to determine if sorting shall be applied ascending (default) or descending. |
return | array |
protected sortByRandom ( ) : array | ||
return | array |
protected array $acceptedExtensions | ||
return | array |
protected string $baseLanguage | ||
return | string |
protected bool $blnShowImages | ||
return | boolean |
protected string $fallbackLanguage | ||
return | string |
protected array $foundFiles | ||
return | array |
protected array $metaInformation | ||
return | array |
protected array $modifiedTime | ||
return | array |
protected array $outputBuffer | ||
return | array |
protected array $pendingIds | ||
return | array |
protected string[] $pendingPaths | ||
return | string[] |
protected array $resizeImages | ||
return | array |
protected string $strLightboxId | ||
return | string |