Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
__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. |
Метод | Описание | |
---|---|---|
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. |
Метод | Описание | |
---|---|---|
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. |
Результат | void |
public addPathById ( string $strId ) : |
||
$strId | string | String uuid of the file. |
Результат |
protected collectFiles ( ) : void | ||
Результат | void |
public static convertUuidsOrPathsToMetaModels ( array $values ) : array | ||
$values | array | The binary uuids or paths to convert. |
Результат | array |
public static convertValueToPath ( string $varValue ) : string | ||
$varValue | string | The file id. |
Результат | string |
public static convertValuesToDatabase ( array $values ) : array | ||
$values | array | The values to convert. |
Результат | array |
public static convertValuesToMetaModels ( array $values ) : array | ||
$values | array | The binary uuid values to convert. |
Результат | array |
protected fetchAdditionalData ( ) : void | ||
Результат | void |
public getAcceptedExtensions ( ) : array | ||
Результат | array |
public getBaseLanguage ( ) : string | ||
Результат | string |
protected getDownloadLink ( string $strFile ) : string | ||
$strFile | string | The file that shall be downloaded. |
Результат | string |
public getFallbackLanguage ( ) : string | ||
Результат | string |
public getLightboxId ( ) : string | ||
Результат | string |
public getResizeImages ( ) : array | ||
Результат | array |
public getShowImages ( ) : boolean | ||
Результат | boolean |
public resolveFiles ( ) : |
||
Результат |
public setBaseLanguage ( string $baseLanguage ) : |
||
$baseLanguage | string | The base language to use. |
Результат |
public setFallbackLanguage ( string $fallbackLanguage ) : |
||
$fallbackLanguage | string | The fallback language to use. |
Результат |
public setLightboxId ( string $strLightboxId ) : |
||
$strLightboxId | string | The lightbox id to use. |
Результат |
public setResizeImages ( array $resizeImages ) : |
||
$resizeImages | array | The resize information. Array of 3 elements: 0: Width, 1: Height, 2: Mode. |
Результат |
public setShowImages ( boolean $blnShowImages ) : |
||
$blnShowImages | boolean | True to show images, false otherwise. |
Результат |
protected sortByDate ( boolean $blnAscending = true ) : array | ||
$blnAscending | boolean | Flag to determine if sorting shall be applied ascending (default) or descending. |
Результат | array |
protected sortByIdList ( array $sortIds ) : array | ||
$sortIds | array | The list of binary ids to sort by. |
Результат | array |
protected sortByName ( boolean $blnAscending = true ) : array | ||
$blnAscending | boolean | Flag to determine if sorting shall be applied ascending (default) or descending. |
Результат | array |
protected sortByRandom ( ) : array | ||
Результат | array |
protected array $acceptedExtensions | ||
Результат | array |
protected string $baseLanguage | ||
Результат | string |
protected bool $blnShowImages | ||
Результат | boolean |
protected string $fallbackLanguage | ||
Результат | string |
protected array $foundFiles | ||
Результат | array |
protected array $metaInformation | ||
Результат | array |
protected array $modifiedTime | ||
Результат | array |
protected array $outputBuffer | ||
Результат | array |
protected array $pendingIds | ||
Результат | array |
protected string[] $pendingPaths | ||
Результат | string[] |
protected array $resizeImages | ||
Результат | array |
protected string $strLightboxId | ||
Результат | string |