|
| __construct (ilObjFileAccessSettings $file_access_settings, ilGlobalPageTemplate $tpl, ilObjUser $user, ilCtrl $ctrl, ilLanguage $lng, ilRbacSystem $rbacsystem, ilErrorHandling $error, ilLogger $log, ilToolbarGUI $toolbar, GlobalHttpState $http_state, Factory $ui_factory, Renderer $ui_renderer, Filesystems $file_systems, FileUpload $file_upload, ilWebDAVMountInstructionsRepository $mount_instructions_repository) |
|
| executeCommand () |
|
| saveDocumentSorting () |
|
◆ __construct()
ilWebDAVMountInstructionsUploadGUI::__construct |
( |
ilObjFileAccessSettings |
$file_access_settings, |
|
|
ilGlobalPageTemplate |
$tpl, |
|
|
ilObjUser |
$user, |
|
|
ilCtrl |
$ctrl, |
|
|
ilLanguage |
$lng, |
|
|
ilRbacSystem |
$rbacsystem, |
|
|
ilErrorHandling |
$error, |
|
|
ilLogger |
$log, |
|
|
ilToolbarGUI |
$toolbar, |
|
|
GlobalHttpState |
$http_state, |
|
|
Factory |
$ui_factory, |
|
|
Renderer |
$ui_renderer, |
|
|
Filesystems |
$file_systems, |
|
|
FileUpload |
$file_upload, |
|
|
ilWebDAVMountInstructionsRepository |
$mount_instructions_repository |
|
) |
| |
Definition at line 18 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References $lng, $log, $tpl, and user().
35 $this->file_access_settings = $file_access_settings;
39 $this->rbacsystem = $rbacsystem;
40 $this->error = $error;
43 $this->toolbar = $toolbar;
44 $this->http_state = $http_state;
45 $this->ui_factory = $ui_factory;
46 $this->ui_renderer = $ui_renderer;
47 $this->file_systems = $file_systems;
48 $this->file_upload = $file_upload;
49 $this->mount_instructions_repository = $mount_instructions_repository;
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ deleteDocument()
ilWebDAVMountInstructionsUploadGUI::deleteDocument |
( |
| ) |
|
|
protected |
Definition at line 205 of file class.ilWebDAVMountInstructionsUploadGUI.php.
207 if (!$this->rbacsystem->checkAccess(
'delete', $this->file_access_settings->getRefId())) {
208 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
210 $webdav_id = $_REQUEST[
'webdav_id'];
211 $this->mount_instructions_repository->deleteMountInstructionsById($webdav_id);
212 ilUtil::sendSuccess($this->lng->txt(
'deleted_successfully'),
true);
213 $this->ctrl->redirect($this,
'showDocuments');
◆ executeCommand()
ilWebDAVMountInstructionsUploadGUI::executeCommand |
( |
| ) |
|
Definition at line 55 of file class.ilWebDAVMountInstructionsUploadGUI.php.
57 $cmd = $this->ctrl->getCmd();
59 if (!$this->rbacsystem->checkAccess(
'read', $this->file_access_settings->getRefId())) {
60 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
63 if ($cmd ==
'' || !method_exists($this, $cmd)) {
64 $cmd =
'showDocuments';
◆ getDocumentByServerRequest()
ilWebDAVMountInstructionsUploadGUI::getDocumentByServerRequest |
( |
| ) |
|
|
protected |
◆ getDocumentForm()
- Parameters
-
- Returns
- ilWebDAVMountInstructionsDocumentFormGUI
Definition at line 102 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References ilWebDAVMountInstructionsDocument\getId(), and user().
Referenced by saveAddDocumentForm(), saveEditDocumentForm(), showAddDocumentForm(), and showEditDocumentForm().
104 if ($a_document->
getId() > 0) {
105 $this->ctrl->setParameter($this,
'doc_id', $a_document->
getId());
107 $form_action = $this->ctrl->getFormAction($this, self::ACTION_SAVE_EDIT_DOCUMENT_FORM);
108 $save_command = self::ACTION_SAVE_EDIT_DOCUMENT_FORM;
110 $form_action = $this->ctrl->getFormAction($this, self::ACTION_SAVE_ADD_DOCUMENT_FORM);
111 $save_command = self::ACTION_SAVE_ADD_DOCUMENT_FORM;
116 $this->mount_instructions_repository,
119 $this->file_systems->temp(),
124 $this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())
◆ saveAddDocumentForm()
ilWebDAVMountInstructionsUploadGUI::saveAddDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 155 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm(), ilUtil\sendFailure(), and ilUtil\sendInfo().
157 if (!$this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
158 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
162 if ($form->saveObject()) {
163 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
164 if ($form->hasTranslatedInfo()) {
167 $this->ctrl->redirect($this,
'showDocuments');
168 } elseif ($form->hasTranslatedError()) {
172 $html = $form->getHTML();
173 $this->tpl->setContent($html);
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getDocumentForm(ilWebDAVMountInstructionsDocument $a_document)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ saveDocumentSorting()
ilWebDAVMountInstructionsUploadGUI::saveDocumentSorting |
( |
| ) |
|
Definition at line 217 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References showDocuments().
219 if (!$this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
220 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
223 $sorting = $this->http_state->request()->getParsedBody()[
'sorting'] ?? [];
224 if (!is_array($sorting) || 0 === count($sorting)) {
230 asort($sorting, SORT_NUMERIC);
233 foreach ($sorting as $document_id => $ignored_sort_value) {
236 if (!is_numeric($document_id)) {
240 $this->mount_instructions_repository->updateSortingValueById((
int) $document_id, ++$position);
243 ilUtil::sendSuccess($this->lng->txt(
'webdav_saved_sorting'),
true);
244 $this->ctrl->redirect($this);
◆ saveEditDocumentForm()
ilWebDAVMountInstructionsUploadGUI::saveEditDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 179 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm(), ilUtil\sendFailure(), and ilUtil\sendInfo().
181 if (!$this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
182 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
186 if ($form->updateObject()) {
187 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
188 if ($form->hasTranslatedInfo()) {
191 $this->ctrl->redirect($this,
'showDocuments');
192 } elseif ($form->hasTranslatedError()) {
196 $html = $form->getHTML();
197 $this->tpl->setContent($html);
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
getDocumentForm(ilWebDAVMountInstructionsDocument $a_document)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ showAddDocumentForm()
ilWebDAVMountInstructionsUploadGUI::showAddDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 130 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm().
132 if (!$this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
133 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
137 $this->tpl->setContent($form->getHTML());
getDocumentForm(ilWebDAVMountInstructionsDocument $a_document)
◆ showDocuments()
ilWebDAVMountInstructionsUploadGUI::showDocuments |
( |
| ) |
|
|
protected |
- Exceptions
-
Definition at line 72 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References ilLinkButton\getInstance().
Referenced by saveDocumentSorting().
74 if ($this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
76 $addDocumentBtn->setPrimary(
true);
77 $addDocumentBtn->setUrl($this->ctrl->getLinkTarget($this,
'showAddDocumentForm'));
78 $addDocumentBtn->setCaption(
'webdav_add_instructions_btn_label');
79 $this->toolbar->addStickyItem($addDocumentBtn);
90 $this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())
93 $document_tbl_gui->populate();
95 $this->tpl->setContent($document_tbl_gui->getHTML());
◆ showEditDocumentForm()
ilWebDAVMountInstructionsUploadGUI::showEditDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 140 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm().
142 if (!$this->rbacsystem->checkAccess(
'write', $this->file_access_settings->getRefId())) {
143 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
146 $document_id = $_REQUEST[
'webdav_id'];
147 $document = $this->mount_instructions_repository->getMountInstructionsDocumentById($document_id);
149 $this->tpl->setContent($form->getHTML());
getDocumentForm(ilWebDAVMountInstructionsDocument $a_document)
◆ ACTION_SAVE_ADD_DOCUMENT_FORM
const ilWebDAVMountInstructionsUploadGUI::ACTION_SAVE_ADD_DOCUMENT_FORM = 'saveAddDocumentForm' |
◆ ACTION_SAVE_EDIT_DOCUMENT_FORM
The documentation for this class was generated from the following file: