|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Class ilFileStandardDropzoneInputGUI. More...
Inheritance diagram for ilFileStandardDropzoneInputGUI:
Collaboration diagram for ilFileStandardDropzoneInputGUI:Public Member Functions | |
| __construct ($cancel_command, $a_title="", $a_postvar="") | |
| ilFileStandardDropzoneInputGUI constructor. More... | |
| getUploadUrl () | |
| setUploadUrl ($upload_url) | |
| Set the URL (using ilCtrl->getFormAction() ) to override the Endpoint the Form will be sent to. More... | |
| getMaxFiles () | |
| setMaxFiles ($max_files) | |
| getMaxFilesize () | |
| setMaxFilesize (\ILIAS\Data\DataSize $max_file_size) | |
| getDropzoneMessage () | |
| setDropzoneMessage ($dropzone_message) | |
| render ($a_mode="") | |
| Render html. More... | |
| checkInput () | |
Check input, strip slashes etc.set alert, if input is not ok.
| |
Public Member Functions inherited from ilFileInputGUI | |
| __construct ($a_title="", $a_postvar="") | |
| Constructor. More... | |
| setValueByArray ($a_values) | |
| Set value by array. More... | |
| setValue ($a_value) | |
| Set Value. More... | |
| getValue () | |
| Get Value. More... | |
| setSize ($a_size) | |
| Set Size. More... | |
| getSize () | |
| Get Size. More... | |
| setFilename ($a_val) | |
| Set filename value (if filename selection is enabled) More... | |
| getFilename () | |
| Get Value. More... | |
| setSuffixes ($a_suffixes) | |
| Set Accepted Suffixes. More... | |
| getSuffixes () | |
| Get Accepted Suffixes. More... | |
| setForbiddenSuffixes ($a_suffixes) | |
| Set forbidden Suffixes. More... | |
| getForbiddenSuffixes () | |
| Get Accepted Suffixes. More... | |
| setPending ($a_val) | |
| Set pending filename value. More... | |
| getPending () | |
| Get pending filename. More... | |
| enableFileNameSelection ($a_post_var) | |
| If enabled, users get the possibility to enter a filename for the uploaded file. More... | |
| isFileNameSelectionEnabled () | |
| Check if filename selection is enabled. More... | |
| getFileNamePostVar () | |
| Get file name post var. More... | |
| setALlowDeletion ($a_val) | |
| Set allow deletion. More... | |
| getALlowDeletion () | |
| Get allow deletion. More... | |
| checkInput () | |
| Check input, strip slashes etc. More... | |
| render ($a_mode="") | |
| Render html. More... | |
| insert ($a_tpl) | |
| Insert property html. More... | |
| getDeletionFlag () | |
| Get deletion flag. More... | |
| getToolbarHTML () | |
| Get HTML for toolbar. More... | |
Public Member Functions inherited from ilSubEnabledFormPropertyGUI | |
| addSubItem ($a_item) | |
| Add Subitem. More... | |
| getSubItems () | |
| Get Subitems. More... | |
| getSubInputItemsRecursive () | |
| returns a flat array of possibly existing subitems recursively More... | |
| checkSubItemsInput () | |
| Check SubItems. More... | |
| getSubForm () | |
| Get sub form html. More... | |
| getItemByPostVar ($a_post_var) | |
| Get item by post var. More... | |
Public Member Functions inherited from ilFormPropertyGUI | |
| __construct ($a_title="", $a_postvar="") | |
| Constructor. More... | |
| executeCommand () | |
| Execute command. More... | |
| getType () | |
| Get Type. More... | |
| setTitle ($a_title) | |
| Set Title. More... | |
| getTitle () | |
| Get Title. More... | |
| setPostVar ($a_postvar) | |
| Set Post Variable. More... | |
| getPostVar () | |
| Get Post Variable. More... | |
| getFieldId () | |
| Get Post Variable. More... | |
| setInfo ($a_info) | |
| Set Information Text. More... | |
| getInfo () | |
| Get Information Text. More... | |
| setAlert ($a_alert) | |
| Set Alert Text. More... | |
| getAlert () | |
| Get Alert Text. More... | |
| setRequired ($a_required) | |
| Set Required. More... | |
| getRequired () | |
| Get Required. More... | |
| setDisabled ($a_disabled) | |
| Set Disabled. More... | |
| getDisabled () | |
| Get Disabled. More... | |
| checkInput () | |
| Check input, strip slashes etc. More... | |
| setParentForm ($a_parentform) | |
| Set Parent Form. More... | |
| getParentForm () | |
| Get Parent Form. More... | |
| setParent ($a_val) | |
| Set Parent GUI object. More... | |
| getParent () | |
| Get Parent GUI object. More... | |
| getSubForm () | |
| Get sub form html. More... | |
| hideSubForm () | |
| Sub form hidden on init? More... | |
| setHiddenTitle ($a_val) | |
| Set hidden title (for screenreaders) More... | |
| getHiddenTitle () | |
| Get hidden title. More... | |
| getItemByPostVar ($a_post_var) | |
| Get item by post var. More... | |
| serializeData () | |
| serialize data More... | |
| unserializeData ($a_data) | |
| unserialize data More... | |
| writeToSession () | |
| Write to session. More... | |
| clearFromSession () | |
| Clear session value. More... | |
| readFromSession () | |
| Read from session. More... | |
| getHiddenTag ($a_post_var, $a_value) | |
| Get hidden tag (used for disabled properties) More... | |
| setMulti ($a_multi, $a_sortable=false, $a_addremove=true) | |
| Set Multi. More... | |
| getMulti () | |
| Get Multi. More... | |
| setMultiValues (array $a_values) | |
| Set multi values. More... | |
| getMultiValues () | |
| Get multi values. More... | |
| getContentOutsideFormTag () | |
| Get content that has to reside outside of the parent form tag, e.g. More... | |
| stripSlashesAddSpaceFallback ($a_str) | |
| Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More... | |
| getTableFilterLabelFor () | |
| Get label "for" attribute value for filter. More... | |
| getFormLabelFor () | |
| Get label "for" attribute value for form. More... | |
| getToolbarHTML () | |
| Get input item HTML to be inserted into ilToolbarGUI. More... | |
Data Fields | |
| const | ASYNC_FILEUPLOAD = "async_fileupload" |
Protected Member Functions | |
| handleUploadURL () | |
| handleSuffixes () | |
| handleMaxFileSize ($dropzone) | |
| initDropzoneMessage () | |
Protected Member Functions inherited from ilFileInputGUI | |
| outputSuffixes ($a_tpl, $a_block="allowed_suffixes") | |
| getMaxFileSizeString () | |
| getMaxFileUploads () | |
| Get number of maximum file uploads as declared in php.ini. More... | |
Protected Member Functions inherited from ilFormPropertyGUI | |
| setType ($a_type) | |
| Set Type. More... | |
| getMultiIconsHTML () | |
| Get HTML for multiple value icons. More... | |
Protected Attributes | |
| $upload_url = '' | |
| $max_files = 1 | |
| $max_file_size | |
| $dropzone_message = '' | |
| $cancel_command | |
Protected Attributes inherited from ilFileInputGUI | |
| $lng | |
| $size = 40 | |
| $pending | |
| $allow_deletion | |
| $forbidden_suffixes = array() | |
Protected Attributes inherited from ilSubEnabledFormPropertyGUI | |
| $sub_items = array() | |
Protected Attributes inherited from ilFormPropertyGUI | |
| $ctrl | |
| $lng | |
| $type | |
| $title | |
| $postvar | |
| $info | |
| $alert | |
| $required = false | |
| $parentgui | |
| $parentform | |
| $hidden_title = "" | |
| $multi = false | |
| $multi_sortable = false | |
| $multi_addremove = true | |
| $multi_values | |
Static Protected Attributes | |
| static | $count = 0 |
Static Protected Attributes inherited from ilFileInputGUI | |
| static | $check_wsp_quota |
Additional Inherited Members | |
Static Public Member Functions inherited from ilFormPropertyGUI | |
| static | removeProhibitedCharacters ($a_text) |
| Remove prohibited characters see #19159. More... | |
Class ilFileStandardDropzoneInputGUI.
A ilFileStandardDropzoneInputGUI is used in a (legacy) Form to upload Files using the Dropzone of the UI-Framework introduced with ILIAS 5.3. In some cases this can be used as a Drop-In-Replacement of the ilFileInputGUI, but check your usecase after. If you need an example how to use it, see e.g. in UI/examples/Dropzone/File/Standard/with_usage_in_legacy_form.php
Why make it a Drop-In-Replacement and not just replace ilFileInputGUI?
Attention: This ilFileStandardDropzoneInputGUI changes the behaviour of your form when used: The Form will be sent asynchronously due to limitations of dropped files (see https://stackoverflow.com/questions/1017224/dynamically-set-value-of-a-file-input )
Attention 2: Your form will be sent for every single file (if e.g. setMaxFiles > 1 is set). This is due to the library used, but also because D&D uploads can only be handled asynchronously. Therefore, the endpoint of the form must be able to handle this accordingly. If you have any questions, please contact fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Definition at line 33 of file class.ilFileStandardDropzoneInputGUI.php.
| ilFileStandardDropzoneInputGUI::__construct | ( | $cancel_command, | |
$a_title = "", |
|||
$a_postvar = "" |
|||
| ) |
ilFileStandardDropzoneInputGUI constructor.
| string | $cancel_command | required as a bugfix for mantis 0025881 |
| string | $a_title | |
| string | $a_postvar |
Definition at line 76 of file class.ilFileStandardDropzoneInputGUI.php.
References $cancel_command, and ILIAS\GlobalScreen\Provider\__construct().
Here is the call graph for this function:| ilFileStandardDropzoneInputGUI::checkInput | ( | ) |
Check input, strip slashes etc.set alert, if input is not ok.
Reimplemented from ilFileInputGUI.
Definition at line 206 of file class.ilFileStandardDropzoneInputGUI.php.
References $_POST, Vendor\Package\$e, ilFormPropertyGUI\getPostVar(), and ilFormPropertyGUI\getRequired().
Here is the call graph for this function:| ilFileStandardDropzoneInputGUI::getDropzoneMessage | ( | ) |
Definition at line 150 of file class.ilFileStandardDropzoneInputGUI.php.
References $dropzone_message.
Referenced by initDropzoneMessage(), and render().
Here is the caller graph for this function:| ilFileStandardDropzoneInputGUI::getMaxFiles | ( | ) |
Definition at line 111 of file class.ilFileStandardDropzoneInputGUI.php.
References $max_files.
Referenced by initDropzoneMessage(), and render().
Here is the caller graph for this function:| ilFileStandardDropzoneInputGUI::getMaxFilesize | ( | ) |
Definition at line 130 of file class.ilFileStandardDropzoneInputGUI.php.
References $max_file_size.
Referenced by handleMaxFileSize().
Here is the caller graph for this function:| ilFileStandardDropzoneInputGUI::getUploadUrl | ( | ) |
Definition at line 85 of file class.ilFileStandardDropzoneInputGUI.php.
References $upload_url.
Referenced by handleUploadURL(), and render().
Here is the caller graph for this function:
|
protected |
| ILIAS\UI\Component\Dropzone\File\Standard | $dropzone |
Definition at line 254 of file class.ilFileStandardDropzoneInputGUI.php.
References getMaxFilesize().
Referenced by render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 241 of file class.ilFileStandardDropzoneInputGUI.php.
References ilFileInputGUI\getSuffixes(), and ilFileInputGUI\setSuffixes().
Referenced by render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 227 of file class.ilFileStandardDropzoneInputGUI.php.
References getUploadUrl(), and setUploadUrl().
Referenced by render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 264 of file class.ilFileStandardDropzoneInputGUI.php.
References getDropzoneMessage(), getMaxFiles(), and setDropzoneMessage().
Referenced by render().
Here is the call graph for this function:
Here is the caller graph for this function:| ilFileStandardDropzoneInputGUI::render | ( | $a_mode = "" | ) |
Render html.
Reimplemented from ilFileInputGUI.
Definition at line 168 of file class.ilFileStandardDropzoneInputGUI.php.
References $count, Vendor\Package\$f, $n, $out, getDropzoneMessage(), getMaxFiles(), ilFormPropertyGUI\getPostVar(), ilFileInputGUI\getSuffixes(), getUploadUrl(), handleMaxFileSize(), handleSuffixes(), handleUploadURL(), initDropzoneMessage(), ilFileInputGUI\isFileNameSelectionEnabled(), and ui().
Here is the call graph for this function:| ilFileStandardDropzoneInputGUI::setDropzoneMessage | ( | $dropzone_message | ) |
| string | $dropzone_message | The message which will be rendered within the dropzone. |
Definition at line 159 of file class.ilFileStandardDropzoneInputGUI.php.
References $dropzone_message.
Referenced by initDropzoneMessage().
Here is the caller graph for this function:| ilFileStandardDropzoneInputGUI::setMaxFiles | ( | $max_files | ) |
| int | $max_files | The amount of files which can be uploaded. Standard is 1 since the old ilFileInputGUI in most cases allows one. |
Definition at line 121 of file class.ilFileStandardDropzoneInputGUI.php.
References $max_files.
| ilFileStandardDropzoneInputGUI::setMaxFilesize | ( | \ILIAS\Data\DataSize | $max_file_size | ) |
| \ILIAS\Data\DataSize | $max_file_size | only files beneath this size will be accepted to upload. Currently this uses the defined valued of the php.ini |
Definition at line 141 of file class.ilFileStandardDropzoneInputGUI.php.
References $max_file_size.
| ilFileStandardDropzoneInputGUI::setUploadUrl | ( | $upload_url | ) |
Set the URL (using ilCtrl->getFormAction() ) to override the Endpoint the Form will be sent to.
If not set, the ilFileStandardDropzoneInputGUI will get the Form-Action of it's nearest form
| string | $upload_url |
Definition at line 100 of file class.ilFileStandardDropzoneInputGUI.php.
References $upload_url.
Referenced by handleUploadURL().
Here is the caller graph for this function:
|
protected |
Definition at line 68 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by __construct().
|
staticprotected |
Definition at line 43 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by render().
|
protected |
Definition at line 63 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by getDropzoneMessage(), and setDropzoneMessage().
|
protected |
Definition at line 59 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by getMaxFilesize(), and setMaxFilesize().
|
protected |
Definition at line 54 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by getMaxFiles(), and setMaxFiles().
|
protected |
Definition at line 49 of file class.ilFileStandardDropzoneInputGUI.php.
Referenced by getUploadUrl(), and setUploadUrl().
| const ilFileStandardDropzoneInputGUI::ASYNC_FILEUPLOAD = "async_fileupload" |
Definition at line 37 of file class.ilFileStandardDropzoneInputGUI.php.