MediaController Class Reference
Detailed Description
MediaController integrates elFinder (https://github.com/Studio-42/elFinder) into wCMF.
- Note
- This class requires ElFinder
The controller supports the following actions:
Action browseMedia
Run elFinder.
Parameter | Description |
---|---|
in directory | elFinder startPath parameter |
in / out fieldName | The name of the input field that should receive the url of the selected file. if not given, elFinder will search for a CkEditor instance and set the url on that. |
out rootUrl | Root url of all media as derived from the configuration value uploadDir in the configuration section media |
out rootPath | Root path of all media as derived from the configuration value uploadDir in the configuration section media |
Response Actions | |
ok | In all cases |
- Note
- elFinder defines action names in the cmd parameter.
Definition at line 51 of file MediaController.php.
Inheritance diagram for MediaController:
Public Member Functions | |
access ($attr, $path, $data, $volume, $isDir, $relpath) | |
Public Member Functions inherited from Controller | |
__construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration) | |
initialize (Request $request, Response $response) | |
execute ($method=null) | |
getRequest () | |
getResponse () | |
Protected Member Functions | |
doExecute ($method=null) | |
onFileMoved ($cmd, $result, $args, $elfinder) | |
getResourceBaseDir () | |
Protected Member Functions inherited from Controller | |
validate () | |
executeSubAction ($action) | |
redirect ($location, $key=null, $data=null) | |
getLogger () | |
getSession () | |
getPersistenceFacade () | |
getPermissionManager () | |
getActionMapper () | |
getLocalization () | |
getMessage () | |
getConfiguration () | |
requireTransaction () | |
endTransaction ($commit) | |
isLocalizedRequest () | |
checkLanguageParameter () | |
generateCsrfToken ($name, $refresh=true) | |
validateCsrfToken ($name, $invalidate=true) | |
getLocalSessionValue ($key, $default=null) | |
setLocalSessionValue ($key, $value) | |
clearLocalSessionValues () | |
Additional Inherited Members | |
Public Attributes inherited from Controller | |
const | CSRF_TOKEN_PARAM = 'csrf_token' |
Member Function Documentation
◆ doExecute()
|
protected |
- See also
- Controller::doExecute()
Reimplemented from Controller.
Definition at line 56 of file MediaController.php.
◆ onFileMoved()
|
protected |
Called when file is moved.
- Parameters
-
$cmd elFinder command name $result Command result as array $args Command arguments from client $elfinder elFinder instance
Definition at line 156 of file MediaController.php.
◆ access()
access | ( | $attr, | |
$path, | |||
$data, | |||
$volume, | |||
$isDir, | |||
$relpath | |||
) |
Access control.
- Parameters
-
$attr Attribute name (read|write|locked|hidden) $path Absolute file path $data Value of volume option accessControlData
$volume elFinder volume driver object $isDir Path is directory (true: directory, false: file, null: unknown) $relpath File path relative to volume root directory started with directory separator
- Returns
- Boolean or null (elFinder decides)
Definition at line 177 of file MediaController.php.
◆ getResourceBaseDir()
|
protected |
Get the base directory for resources.
The default implementation returns the directory configured by the 'uploadDir' key in section 'media'.
- Returns
- The directory name
- Note
- Subclasses will override this method to implement special application requirements
Definition at line 188 of file MediaController.php.