Documentation

rex_mediapool
in package

FinalYes

Table of Contents

Methods

filename()  : string
Erstellt einen Filename der eindeutig ist für den Medienpool.
getAllowedExtensions()  : array<string|int, mixed>
Get allowed mediatype extensions given via media widget "types" param.
getAllowedMimeTypes()  : array<string, array<int, string>>
Get global list of allowed mime types.
getBlockedExtensions()  : array<string|int, mixed>
Get global blocked mediatype extensions.
isAllowedExtension()  : bool
check if mediatpye(extension) is allowed for upload.
isAllowedMimeType()  : bool
Checks file against optional property `allowed_mime_types`.
mediaIsInUse()  : bool|string
setAllowedMimeTypes()  : void
Set global list of allowed mime types.

Methods

filename()

Erstellt einen Filename der eindeutig ist für den Medienpool.

public static filename(string $mediaName[, bool $doSubindexing = true ]) : string
Parameters
$mediaName : string

Dateiname

$doSubindexing : bool = true
Return values
string

getAllowedExtensions()

Get allowed mediatype extensions given via media widget "types" param.

public static getAllowedExtensions([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []

widget params

Return values
array<string|int, mixed>

allowedExtensions

getAllowedMimeTypes()

Get global list of allowed mime types.

public static getAllowedMimeTypes() : array<string, array<int, string>>
Return values
array<string, array<int, string>>

Mapping of file extensions to corresponding list of allowed mime types

getBlockedExtensions()

Get global blocked mediatype extensions.

public static getBlockedExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

blocked mediatype extensions

isAllowedExtension()

check if mediatpye(extension) is allowed for upload.

public static isAllowedExtension(string $filename[, array<string|int, mixed> $args = [] ]) : bool
Parameters
$filename : string
$args : array<string|int, mixed> = []
Return values
bool

isAllowedMimeType()

Checks file against optional property `allowed_mime_types`.

public static isAllowedMimeType(string $path[, string|null $filename = null ]) : bool
Parameters
$path : string

Path to the physical file

$filename : string|null = null

Optional filename, will be used for extracting the file extension. If not given, the extension is extracted from $path.

Return values
bool

mediaIsInUse()

public static mediaIsInUse(string $filename) : bool|string
Parameters
$filename : string
Return values
bool|string

setAllowedMimeTypes()

Set global list of allowed mime types.

public static setAllowedMimeTypes(array<string, array<int, string>> $mimeTypes) : void
Parameters
$mimeTypes : array<string, array<int, string>>

Mapping of file extensions to corresponding list of allowed mime types


        
On this page

Search results