Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
canUpload ($file, $component='com_media', $allowedExecutables=array()) | |
countFiles ($dir) | |
toBytes ($val) | |
Fonctions membres publiques statiques | |
static | isImage ($fileName) |
static | getTypeIcon ($fileName) |
static | getMimeType ($file, $isImage=false) |
static | checkFileExtension ($extension, $component='com_media', $allowedExecutables=array()) |
static | imageResize ($width, $height, $target) |
static | isValidLocalDirectory ($directory) |
static | getCleanMediaFieldValue ($value) |
Champs de données | |
const | EXECUTABLES |
Fonctions membres privées | |
checkMimeType ($mime, $component='com_media') | |
Media helper class
canUpload | ( | $file, | |
$component = 'com_media' , |
|||
$allowedExecutables = array() |
|||
) |
Checks if the file can be uploaded
array | $file | File information |
string | $component | The option name for the component storing the parameters |
string | $allowedExecutables | Array of executable file types that shall be whitelisted |
Références $app, $check, $component, $i, $maxSize, $params, $result, $sanitizer, Text\_(), elseif, InputFilter\FORBIDDEN_FILE_EXTENSIONS, Factory\getApplication(), ComponentHelper\getParams(), Factory\getUser(), File\makeSafe(), et Text\sprintf().
|
static |
Checks the file extension
string | $extension | The extension to be checked |
string | $component | The optional name for the component storing the parameters |
Références $component, $extension, $params, InputFilter\FORBIDDEN_FILE_EXTENSIONS, et ComponentHelper\getParams().
Référencé par LocalAdapter\moveFile().
|
private |
Checks the Mime type
string | $mime | The mime to be checked |
string | $component | The optional name for the component storing the parameters |
Références $component, $params, et ComponentHelper\getParams().
countFiles | ( | $dir | ) |
Counts the files and directories in a directory that are not php or html files.
string | $dir | Directory name |
Références $dir.
|
static |
Helper method get clean data for value stores in a Media form field by removing adapter information from the value if available (in this case, the value will have this format: images/headers/blue-flower.jpg#joomlaImage://local-images/headers/blue-flower.jpg?width=700&height=180)
string | $value |
Références $value.
|
static |
Get the Mime type
string | $file | The link to the file to be checked |
boolean | $isImage | True if the passed file is an image else false |
Références elseif.
Référencé par LocalAdapter\getPathInformation().
|
static |
Gets the file extension for purposed of using an icon
string | $fileName | The filename |
|
static |
|
static |
Checks if the file is an image
string | $fileName | The filename |
Référencé par LocalAdapter\getPathInformation().
|
static |
Method to check if the given directory is a directory configured in FileSystem - Local plugin
string | $directory |
Références $params, et PluginHelper\getPlugin().
Référencé par MediaField\getLayoutData().
toBytes | ( | $val | ) |
Small helper function that properly converts any configuration options to their byte representation.
string | integer | $val | The value to be converted to bytes. |
Références $val.
const EXECUTABLES |