|
| __construct (ilObjWebDAV $webdav_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 |
( |
ilObjWebDAV |
$webdav_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->webdav_settings = $webdav_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($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
◆ deleteDocument()
ilWebDAVMountInstructionsUploadGUI::deleteDocument |
( |
| ) |
|
|
protected |
Definition at line 208 of file class.ilWebDAVMountInstructionsUploadGUI.php.
210 if (!$this->rbacsystem->checkAccess(
'delete', $this->webdav_settings->getRefId())) {
211 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
213 $webdav_id = $_REQUEST[
'webdav_id'];
214 $this->mount_instructions_repository->deleteMountInstructionsById($webdav_id);
215 ilUtil::sendSuccess($this->lng->txt(
'deleted_successfully'),
true);
216 $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->webdav_settings->getRefId())) {
60 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
63 if ($cmd ==
'delete') {
66 if ($cmd ==
'' || !method_exists($this, $cmd)) {
67 $cmd =
'showDocuments';
◆ getDocumentByServerRequest()
ilWebDAVMountInstructionsUploadGUI::getDocumentByServerRequest |
( |
| ) |
|
|
protected |
◆ getDocumentForm()
- Parameters
-
- Returns
- ilWebDAVMountInstructionsDocumentFormGUI
Definition at line 105 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References ilWebDAVMountInstructionsDocument\getId(), and user().
Referenced by saveAddDocumentForm(), saveEditDocumentForm(), showAddDocumentForm(), and showEditDocumentForm().
107 if ($a_document->
getId() > 0) {
108 $this->ctrl->setParameter($this,
'doc_id', $a_document->
getId());
110 $form_action = $this->ctrl->getFormAction($this, self::ACTION_SAVE_EDIT_DOCUMENT_FORM);
111 $save_command = self::ACTION_SAVE_EDIT_DOCUMENT_FORM;
113 $form_action = $this->ctrl->getFormAction($this, self::ACTION_SAVE_ADD_DOCUMENT_FORM);
114 $save_command = self::ACTION_SAVE_ADD_DOCUMENT_FORM;
119 $this->mount_instructions_repository,
122 $this->file_systems->temp(),
127 $this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())
◆ saveAddDocumentForm()
ilWebDAVMountInstructionsUploadGUI::saveAddDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 158 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm(), ilUtil\sendFailure(), and ilUtil\sendInfo().
160 if (!$this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
161 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
165 if ($form->saveObject()) {
166 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
167 if ($form->hasTranslatedInfo()) {
170 $this->ctrl->redirect($this,
'showDocuments');
171 } elseif ($form->hasTranslatedError()) {
175 $html = $form->getHTML();
176 $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 220 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References showDocuments().
222 if (!$this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
223 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
226 $sorting = $this->http_state->request()->getParsedBody()[
'sorting'] ?? [];
227 if (!is_array($sorting) || 0 === count($sorting)) {
233 asort($sorting, SORT_NUMERIC);
236 foreach ($sorting as $document_id => $ignored_sort_value) {
239 if (!is_numeric($document_id)) {
243 $this->mount_instructions_repository->updateSortingValueById((
int) $document_id, ++$position);
246 ilUtil::sendSuccess($this->lng->txt(
'webdav_saved_sorting'),
true);
247 $this->ctrl->redirect($this);
◆ saveEditDocumentForm()
ilWebDAVMountInstructionsUploadGUI::saveEditDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 182 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm(), ilUtil\sendFailure(), and ilUtil\sendInfo().
184 if (!$this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
185 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
189 if ($form->updateObject()) {
190 ilUtil::sendSuccess($this->lng->txt(
'saved_successfully'),
true);
191 if ($form->hasTranslatedInfo()) {
194 $this->ctrl->redirect($this,
'showDocuments');
195 } elseif ($form->hasTranslatedError()) {
199 $html = $form->getHTML();
200 $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 133 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm().
135 if (!$this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
136 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
140 $this->tpl->setContent($form->getHTML());
getDocumentForm(ilWebDAVMountInstructionsDocument $a_document)
◆ showDocuments()
ilWebDAVMountInstructionsUploadGUI::showDocuments |
( |
| ) |
|
|
protected |
- Exceptions
-
Definition at line 75 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References ilLinkButton\getInstance().
Referenced by saveDocumentSorting().
77 if ($this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
79 $addDocumentBtn->setPrimary(
true);
80 $addDocumentBtn->setUrl($this->ctrl->getLinkTarget($this,
'showAddDocumentForm'));
81 $addDocumentBtn->setCaption(
'webdav_add_instructions_btn_label');
82 $this->toolbar->addStickyItem($addDocumentBtn);
93 $this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())
96 $document_tbl_gui->populate();
98 $this->tpl->setContent($document_tbl_gui->getHTML());
◆ showEditDocumentForm()
ilWebDAVMountInstructionsUploadGUI::showEditDocumentForm |
( |
| ) |
|
|
protected |
Definition at line 143 of file class.ilWebDAVMountInstructionsUploadGUI.php.
References getDocumentForm().
145 if (!$this->rbacsystem->checkAccess(
'write', $this->webdav_settings->getRefId())) {
146 $this->error->raiseError($this->lng->txt(
'permission_denied'), $this->error->MESSAGE);
149 $document_id = $_REQUEST[
'webdav_id'];
150 $document = $this->mount_instructions_repository->getMountInstructionsDocumentById($document_id);
152 $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: