UNA
|
Public Member Functions | |
isAvailable () | |
isInstalled () | |
handleUploads ($iProfileId, $mixedFiles, $isMultiple=true, $iContentId=false, $bPrivate=true) | |
getUploaderButton ($aParams=array()) | |
getUploaderJs ($mixedGhostTemplate, $isMultiple=true, $aParams=array(), $bDynamic=false) | |
addCssJs ($bDynamic=false) | |
getUploaderButtonTitle ($mixed=false) | |
getUploaderForm ($isMultiple=true, $iContentId=false, $isPrivate=true) | |
getGhosts ($iProfileId, $sFormat, $sImagesTranscoder=false, $iContentId=false) | |
reorderGhosts ($iProfileId, $sFormat, $aGhosts, $iContentId=false) | |
deleteGhost ($iFileId, $iProfileId) | |
deleteGhostsForProfile ($iProfileId, $iContentId=false) | |
Protected Member Functions | |
__construct ($aObject, $sStorageObject, $sUniqId, $oTemplate) | |
Uploaders are disigned to work as form field in forms.
To add file to any form, use the following form field array:
Available uploaders:
Uploaded files are showed as "nested" forms. You can pass nested form in 'ghost_template' parameter. If you don't pass anything in 'ghost_template' parameter, then only file id is passed upon form submission. The nested form can be declared using the different ways:
Array is automatically modified to add necessary form attributes to work as nested form, file id field is added automatically as hidden input as well.
All 3 variants can have the following replace markers to substitute with real values:
|
protected |
constructor
BxDolUploader::addCssJs | ( | $bDynamic = false | ) |
add necessary js, css files and js translations
BxDolUploader::deleteGhost | ( | $iFileId, | |
$iProfileId | |||
) |
Delete file by file id, usually ghost file
BxDolUploader::deleteGhostsForProfile | ( | $iProfileId, | |
$iContentId = false |
|||
) |
Delete all ghosts files for the specified profile
BxDolUploader::getGhosts | ( | $iProfileId, | |
$sFormat, | |||
$sImagesTranscoder = false , |
|||
$iContentId = false |
|||
) |
Display uploaded, but not saved files - ghosts
$iProfileId | - profile id to get orphaned files from |
$sFormat | - output format, only 'json' output formt is supported |
$sImagesTranscoder | - transcoder object for files preview for images and videos, false by default - no preview |
$iContentId | - content id to get orphaned files from, false by default |
BxDolUploader::getUploaderButton | ( | $aParams = array() | ) |
Show uploader button.
BxDolUploader::getUploaderButtonTitle | ( | $mixed = false | ) |
Get uploader button title
BxDolUploader::getUploaderForm | ( | $isMultiple = true , |
|
$iContentId = false , |
|||
$isPrivate = true |
|||
) |
Show uploader form.
BxDolUploader::getUploaderJs | ( | $mixedGhostTemplate, | |
$isMultiple = true , |
|||
$aParams = array() , |
|||
$bDynamic = false |
|||
) |
Show uploader JS.
BxDolUploader::handleUploads | ( | $iProfileId, | |
$mixedFiles, | |||
$isMultiple = true , |
|||
$iContentId = false , |
|||
$bPrivate = true |
|||
) |
Handle uploads here.
$mixedFiles | as usual $_FILES['some_name'] array, but maybe some other params depending on the uploader |
BxDolUploader::isAvailable | ( | ) |
Is uploader available?
BxDolUploader::isInstalled | ( | ) |
Are required php modules installed for this uploader ?
BxDolUploader::reorderGhosts | ( | $iProfileId, | |
$sFormat, | |||
$aGhosts, | |||
$iContentId = false |
|||
) |
Reorder uploaded ghosts.
$iProfileId | - profile id to get orphaned files from |
$sFormat | - output format, only 'json' output formt is supported |
$aGhosts | - an array of ordered ghosts' IDs. |
$iContentId | - content id to order orphaned files for, false by default |