MediaManager
extends MediaLibrary
in package
Media Manager
Tags
Table of Contents
Properties
- $_arrSettings : mixed
- $_objImage : mixed
- $_objTpl : mixed
- $_strOkMessage : mixed
- $archive : mixed
- $arrImageQualityValues : mixed
- $arrPaths : mixed
- $arrWebPaths : mixed
- $chmodFile : mixed
- $chmodFolder : mixed
- $dirLog : mixed
- $docRoot : mixed
- $fileLog : mixed
- $getAct : mixed
- $getData : mixed
- $getFile : mixed
- $getPath : mixed
- $highlightCCColor : mixed
- $highlightColor : mixed
- $highlightName : mixed
- $pageTitle : mixed
- $path : mixed
- $shopEnabled : mixed
- $thumbHeight : mixed
- $thumbQuality : mixed
- $tmpPath : mixed
- $tmpPathName : mixed
- $webPath : mixed
- $sortBy : mixed
- $sortDesc : mixed
Methods
- __construct() : mixed
- PHP5 constructor
- _copyMedia() : mixed
- copies the media -> paste inserts the media
- _createNewDir() : mixed
- _cutMedia() : mixed
- cuts the media -> paste insterts the media
- _deleteMedia() : mixed
- _deleteMedia2() : mixed
- _downloadMedia() : mixed
- Send a file for downloading
- _downloadMediaOLD() : mixed
- downloads the media
- _formatDate() : mixed
- _formatPerm() : mixed
- _formatSize() : mixed
- _formatType() : mixed
- _getDate() : mixed
- _getIcon() : string
- Gets the icon for the file
- _getIconPath() : string
- Returns icon's absolute path
- _getIconWebPath() : string
- Returns icon's web path
- _getJavaScriptCodePreview() : mixed
- _getPerm() : mixed
- _getSize() : mixed
- _getType() : mixed
- _overviewMedia() : string
- Overview Media Data
- _pasteMedia() : mixed
- Inserts the file
- _pathCheck() : mixed
- _renameMedia() : string
- Rename Media Data
- _saveSettings() : mixed
- Validate and save settings from $_POST into the database.
- _settings() : string
- Display and editing Media settings
- _sortDirTree() : mixed
- _sortingClass() : mixed
- _sortingIcons() : mixed
- createSettingsArray() : array<string|int, mixed>
- Create an array containing all settings of the media-module.
- editImage() : bool
- Edits and saves an image.
- editMedia() : string
- Shows the image manipulation component.
- getDirectoryTree() : array<string|int, mixed>
- Get files by search term
- getFileTypeIconWebPath() : string
- Get the web path to the icon used for displaying the file type of a file
- getImage() : image
- This method is used for the image preview.
- getImageSettings() : array<string|int, mixed>
- Returns the image settings array.
- getMediaPage() : string
- Gets the requested page
- handleRedirect() : mixed
- Redirect to the page by requested redirect url
- isFileValidToShow() : bool
- Return whether file is valid to show or not
- isIllegalFileName() : bool
- Check the the file name is illegal or not.
- renMedia() : mixed
- Renames a media file
- uploadFinished() : string
- this is called as soon as uploads have finished.
- isFileLocatedInCurrentArchive() : bool
- Verify that $path is located within the current archive ({@see static::$path}).
- checkModule() : bool
- Checks whether the specified module is available and active.
Properties
$_arrSettings
public
mixed
$_arrSettings
= array()
$_objImage
public
mixed
$_objImage
$_objTpl
public
mixed
$_objTpl
$_strOkMessage
public
mixed
$_strOkMessage
= ''
$archive
public
mixed
$archive
$arrImageQualityValues
public
mixed
$arrImageQualityValues
= array(5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100)
$arrPaths
public
mixed
$arrPaths
$arrWebPaths
public
mixed
$arrWebPaths
$chmodFile
public
mixed
$chmodFile
= 0644
$chmodFolder
public
mixed
$chmodFolder
= 0777
$dirLog
public
mixed
$dirLog
$docRoot
public
mixed
$docRoot
$fileLog
public
mixed
$fileLog
$getAct
public
mixed
$getAct
$getData
public
mixed
$getData
$getFile
public
mixed
$getFile
$getPath
public
mixed
$getPath
$highlightCCColor
public
mixed
$highlightCCColor
= '#ffe7e7'
$highlightColor
public
mixed
$highlightColor
= '#d8ffca'
$highlightName
public
mixed
$highlightName
= array()
$pageTitle
public
mixed
$pageTitle
$path
public
mixed
$path
$shopEnabled
public
mixed
$shopEnabled
$thumbHeight
public
mixed
$thumbHeight
= 80
$thumbQuality
public
mixed
$thumbQuality
= 80
$tmpPath
public
mixed
$tmpPath
= array()
$tmpPathName
public
mixed
$tmpPathName
= array()
$webPath
public
mixed
$webPath
$sortBy
protected
mixed
$sortBy
= 'name'
$sortDesc
protected
mixed
$sortDesc
= false
Methods
__construct()
PHP5 constructor
public
__construct() : mixed
Tags
_copyMedia()
copies the media -> paste inserts the media
public
_copyMedia() : mixed
act: copy
_createNewDir()
public
_createNewDir(mixed $dirName) : mixed
Parameters
- $dirName : mixed
_cutMedia()
cuts the media -> paste insterts the media
public
_cutMedia() : mixed
act: cut
_deleteMedia()
public
_deleteMedia() : mixed
_deleteMedia2()
public
_deleteMedia2(mixed $file) : mixed
Parameters
- $file : mixed
_downloadMedia()
Send a file for downloading
public
_downloadMedia() : mixed
_downloadMediaOLD()
downloads the media
public
_downloadMediaOLD() : mixed
act: download
_formatDate()
public
_formatDate(mixed $date) : mixed
Parameters
- $date : mixed
_formatPerm()
public
_formatPerm(mixed $perm, mixed $key) : mixed
Parameters
- $perm : mixed
- $key : mixed
_formatSize()
public
_formatSize(mixed $size) : mixed
Parameters
- $size : mixed
_formatType()
public
_formatType(mixed $type) : mixed
Parameters
- $type : mixed
_getDate()
public
_getDate(mixed $file) : mixed
Parameters
- $file : mixed
_getIcon()
Gets the icon for the file
public
static _getIcon(string $file[, string $fileType = null ]) : string
Parameters
- $file : string
-
The File Path
- $fileType : string = null
-
(optional) The File type
Return values
string —The Icon name
_getIconPath()
Returns icon's absolute path
public
static _getIconPath() : string
Return values
string_getIconWebPath()
Returns icon's web path
public
static _getIconWebPath() : string
Return values
string_getJavaScriptCodePreview()
public
_getJavaScriptCodePreview() : mixed
_getPerm()
public
_getPerm(mixed $file) : mixed
Parameters
- $file : mixed
_getSize()
public
_getSize(mixed $file) : mixed
Parameters
- $file : mixed
_getType()
public
_getType(mixed $file) : mixed
Parameters
- $file : mixed
_overviewMedia()
Overview Media Data
public
_overviewMedia() : string
Tags
Return values
string —parsed content
_pasteMedia()
Inserts the file
public
_pasteMedia() : mixed
act: paste
_pathCheck()
public
_pathCheck(mixed $path) : mixed
Parameters
- $path : mixed
_renameMedia()
Rename Media Data
public
_renameMedia() : string
Tags
Return values
string —parsed content
_saveSettings()
Validate and save settings from $_POST into the database.
public
_saveSettings() : mixed
Tags
_settings()
Display and editing Media settings
public
_settings() : string
Return values
string —parsed content
_sortDirTree()
public
_sortDirTree(mixed $tree) : mixed
Parameters
- $tree : mixed
_sortingClass()
public
_sortingClass() : mixed
_sortingIcons()
public
_sortingIcons() : mixed
createSettingsArray()
Create an array containing all settings of the media-module.
public
createSettingsArray() : array<string|int, mixed>
Example: $arrSettings[$strSettingName] for the content of $strSettingsName
Tags
Return values
array<string|int, mixed> —$arrReturn
editImage()
Edits and saves an image.
public
editImage(array<string|int, mixed> $arrData) : bool
Parameters
- $arrData : array<string|int, mixed>
-
Contains $_POST array.
Return values
bool —True on success, false otherwise.
editMedia()
Shows the image manipulation component.
public
editMedia() : string
Tags
Return values
string —Parsed content.
getDirectoryTree()
Get files by search term
public
getDirectoryTree([string $path = '' ][, string $searchTerm = '' ][, array<string|int, mixed> &$result = array() ][, bool $recursive = false ]) : array<string|int, mixed>
Parameters
- $path : string = ''
-
Path to search files
- $searchTerm : string = ''
-
Search term
- $result : array<string|int, mixed> = array()
-
Result files and directory array
- $recursive : bool = false
-
True to search recursive
Return values
array<string|int, mixed> —Files array by given search term
getFileTypeIconWebPath()
Get the web path to the icon used for displaying the file type of a file
public
static getFileTypeIconWebPath(string $file[, string $fileType = null ]) : string
Parameters
- $file : string
-
File of which the related file type icon path shall be returned. File must be an absolute file system path or an URL.
- $fileType : string = null
-
(optional) The file type of $file (as file extension). When supplied, the method will skip the file type detection and will run quite faster.
Return values
string —Web path to the icon.
getImage()
This method is used for the image preview.
public
getImage(array<string|int, mixed> $arrData) : image
Parameters
- $arrData : array<string|int, mixed>
-
Contains $_GET array.
Return values
image —On error,
getImageSettings()
Returns the image settings array.
public
getImageSettings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —$arrImageSettings
getMediaPage()
Gets the requested page
public
getMediaPage() : string
Tags
Return values
string —parsed content
handleRedirect()
Redirect to the page by requested redirect url
public
handleRedirect() : mixed
isFileValidToShow()
Return whether file is valid to show or not
public
isFileValidToShow(string $filePath, string $fileName) : bool
Parameters
- $filePath : string
-
Folder path to the file
- $fileName : string
-
File name
Return values
bool —True when file is valid to show, False otherwise
isIllegalFileName()
Check the the file name is illegal or not.
public
static isIllegalFileName(type $file) : bool
Parameters
- $file : type
Return values
boolrenMedia()
Renames a media file
public
renMedia() : mixed
uploadFinished()
this is called as soon as uploads have finished.
public
static uploadFinished(mixed $tempPath, mixed $tempWebPath, mixed $data, mixed $uploadId, mixed $fileInfos, mixed $response) : string
takes care of moving them to the right folder
Parameters
- $tempPath : mixed
- $tempWebPath : mixed
- $data : mixed
- $uploadId : mixed
- $fileInfos : mixed
- $response : mixed
Return values
string —the directory to move to
isFileLocatedInCurrentArchive()
Verify that $path is located within the current archive ({@see static::$path}).
protected
isFileLocatedInCurrentArchive(string $path) : bool
Parameters
- $path : string
-
Filesystem path to verify.
Return values
bool —True if $path is located within the current archive
checkModule()
Checks whether the specified module is available and active.
private
checkModule(mixed $module) : bool
Parameters
- $module : mixed
Return values
bool —True or false.