ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjWebDAVGUI Class Reference
+ Inheritance diagram for ilObjWebDAVGUI:
+ Collaboration diagram for ilObjWebDAVGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 editSettings ()
 Edit settings. More...
 
 saveSettings ()
 Save settings. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

const CMD_EDIT_SETTINGS = 'editSettings'
 
const CMD_SAVE_SETTINGS = 'saveSettings'
 
 $error_handling
 
 $lng
 
 $tpl
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initSettingsForm ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $ctrl
 
 $db
 
 $filesystem
 
 $http
 
 $logger
 
 $rbacsystem
 
 $settings
 ilSetting More...
 
 $tabs
 
 $ui_factory
 
 $ui_renderer
 
 $upload
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Detailed Description

Definition at line 15 of file class.ilObjWebDAVGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjWebDAVGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Constructor.

public

Definition at line 83 of file class.ilObjWebDAVGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\FileDelivery\http(), and settings().

84  {
85  global $DIC;
86 
87  $this->type = "wbdv";
88  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
89 
90  $this->ctrl = $DIC['ilCtrl'];
91  $this->db = $DIC->database();
92  $this->error_handling = $DIC["ilErr"];
93  $this->filesystem = $DIC->filesystem();
94  $this->http = $DIC->http();
95  $this->lng = $DIC->language();
96  $this->logger = $DIC->logger()->root();
97  $this->rbacsystem = $DIC['rbacsystem'];
98  $this->settings = $DIC['ilSetting'];
99  $this->tabs = $DIC['ilTabs'];
100  $this->tpl = $DIC['tpl'];
101  $this->tree = $DIC['tree'];
102  $this->ui_factory = $DIC->ui()->factory();
103  $this->ui_renderer = $DIC->ui()->renderer();
104  $this->upload = $DIC->upload();
105  }
settings()
Definition: settings.php:2
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ editSettings()

ilObjWebDAVGUI::editSettings ( )

Edit settings.

Definition at line 221 of file class.ilObjWebDAVGUI.php.

References initSettingsForm().

222  {
223  $this->tabs_gui->activateTab('webdav_general_settings');
224 
225  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
226  $this->error_handling->raiseError(
227  $this->lng->txt("no_permission"),
228  $this->error_handling->WARNING
229  );
230  }
231 
232  $form = $this->initSettingsForm();
233 
234  $this->tpl->setContent($form->getHTML());
235  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWebDAVGUI::executeCommand ( )

Execute command.

public

Definition at line 114 of file class.ilObjWebDAVGUI.php.

References ILIAS\FileDelivery\http(), ilObjectGUI\prepareOutput(), and user().

115  {
116  $next_class = $this->ctrl->getNextClass($this);
117  $cmd = $this->ctrl->getCmd();
118 
119  $this->prepareOutput();
120 
121  if (!$this->access->checkAccess('read', '', $this->object->getRefId())) {
122  $this->error_handling->raiseError(
123  $this->lng->txt('no_permission'),
124  $this->error_handling->error_obj->MESSAGE
125  );
126  }
127 
128  switch ($next_class) {
129  case strtolower(ilWebDAVMountInstructionsUploadGUI::class):
130  $document_gui = new ilWebDAVMountInstructionsUploadGUI(
131  $this->object,
132  $this->tpl,
133  $this->user,
134  $this->ctrl,
135  $this->lng,
136  $this->rbacsystem,
137  $this->error_handling,
138  $this->logger,
139  $this->toolbar,
140  $this->http,
141  $this->ui_factory,
142  $this->ui_renderer,
143  $this->filesystem,
144  $this->upload,
146  );
147  $this->tabs_gui->activateTab('webdav_upload_instructions');
148  $this->ctrl->forwardCommand($document_gui);
149  break;
150 
151  default:
152  if (!$cmd || $cmd == 'view') {
153  $cmd = self::CMD_EDIT_SETTINGS;
154  }
155  $this->$cmd();
156  break;
157  }
158 
159  return true;
160  }
user()
Definition: user.php:4
prepareOutput($a_show_subobjects=true)
prepare output
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjWebDAVGUI::getAdminTabs ( )

Get tabs.

Definition at line 166 of file class.ilObjWebDAVGUI.php.

167  {
168  if ($this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
169  $this->tabs_gui->addTab(
170  'webdav_general_settings',
171  $this->lng->txt("webdav_general_settings"),
172  $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
173  );
174  $this->tabs_gui->addTab(
175  'webdav_upload_instructions',
176  $this->lng->txt("webdav_upload_instructions"),
177  $this->ctrl->getLinkTargetByClass(ilWebDAVMountInstructionsUploadGUI::class)
178  );
179  }
180  }

◆ initSettingsForm()

ilObjWebDAVGUI::initSettingsForm ( )
protected

Definition at line 193 of file class.ilObjWebDAVGUI.php.

References ilCheckboxInputGUI\setValue().

Referenced by editSettings(), and saveSettings().

194  {
195  $form = new ilPropertyFormGUI();
196  $form->setFormAction($this->ctrl->getFormAction($this));
197  $form->setTitle($this->lng->txt("settings"));
198 
199  // Enable webdav
200  $cb_prop = new ilCheckboxInputGUI($this->lng->txt("enable_webdav"), "enable_webdav");
201  $cb_prop->setValue('1');
202  $cb_prop->setChecked($this->object->isWebdavEnabled());
203  $form->addItem($cb_prop);
204 
205  // Enable versioning
206  $cb_prop = new ilCheckboxInputGUI($this->lng->txt("webdav_enable_versioning"), "enable_versioning_webdav");
207  $cb_prop->setValue('1');
208  $cb_prop->setInfo($this->lng->txt("webdav_versioning_info"));
209  $cb_prop->setChecked($this->object->isWebdavVersioningEnabled());
210  $form->addItem($cb_prop);
211 
212  // command buttons
213  $form->addCommandButton(self::CMD_SAVE_SETTINGS, $this->lng->txt('save'));
214 
215  return $form;
216  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjWebDAVGUI::saveSettings ( )

Save settings.

Definition at line 241 of file class.ilObjWebDAVGUI.php.

References $_POST, initSettingsForm(), and ilUtil\sendFailure().

242  {
243  if (!$this->rbacsystem->checkAccess("write", $this->object->getRefId())) {
244  ilUtil::sendFailure($this->lng->txt('no_permission'), true);
245  $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
246  }
247 
248  $form = $this->initSettingsForm();
249  if ($form->checkInput()) {
250  $this->object->setWebdavEnabled($_POST['enable_webdav'] == '1');
251  $this->object->setWebdavVersioningEnabled($_POST['enable_versioning_webdav'] == '1');
252  $this->object->update();
253  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
254  $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
255  } else {
256  $form->setValuesByPost();
257  $this->tpl->setContent($form->getHTML());
258  }
259  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
+ Here is the call graph for this function:

◆ setTitleAndDescription()

ilObjWebDAVGUI::setTitleAndDescription ( )

called by prepare output

Definition at line 186 of file class.ilObjWebDAVGUI.php.

187  {
188  parent::setTitleAndDescription();
189  $this->tpl->setDescription($this->object->getDescription());
190  }

Field Documentation

◆ $ctrl

ilObjWebDAVGUI::$ctrl
protected

Definition at line 23 of file class.ilObjWebDAVGUI.php.

◆ $db

ilObjWebDAVGUI::$db
protected

Definition at line 27 of file class.ilObjWebDAVGUI.php.

◆ $error_handling

ilObjWebDAVGUI::$error_handling

Definition at line 31 of file class.ilObjWebDAVGUI.php.

◆ $filesystem

ilObjWebDAVGUI::$filesystem
protected

Definition at line 35 of file class.ilObjWebDAVGUI.php.

◆ $http

ilObjWebDAVGUI::$http
protected

Definition at line 39 of file class.ilObjWebDAVGUI.php.

◆ $lng

ilObjWebDAVGUI::$lng

Definition at line 43 of file class.ilObjWebDAVGUI.php.

◆ $logger

ilObjWebDAVGUI::$logger
protected

Definition at line 47 of file class.ilObjWebDAVGUI.php.

◆ $rbacsystem

ilObjWebDAVGUI::$rbacsystem
protected

Definition at line 51 of file class.ilObjWebDAVGUI.php.

◆ $settings

ilObjWebDAVGUI::$settings
protected

ilSetting

Definition at line 55 of file class.ilObjWebDAVGUI.php.

◆ $tabs

ilObjWebDAVGUI::$tabs
protected

Definition at line 59 of file class.ilObjWebDAVGUI.php.

◆ $tpl

ilObjWebDAVGUI::$tpl

Definition at line 63 of file class.ilObjWebDAVGUI.php.

◆ $ui_factory

ilObjWebDAVGUI::$ui_factory
protected

Definition at line 67 of file class.ilObjWebDAVGUI.php.

◆ $ui_renderer

ilObjWebDAVGUI::$ui_renderer
protected

Definition at line 71 of file class.ilObjWebDAVGUI.php.

◆ $upload

ilObjWebDAVGUI::$upload
protected

Definition at line 75 of file class.ilObjWebDAVGUI.php.

◆ CMD_EDIT_SETTINGS

const ilObjWebDAVGUI::CMD_EDIT_SETTINGS = 'editSettings'

Definition at line 17 of file class.ilObjWebDAVGUI.php.

◆ CMD_SAVE_SETTINGS

const ilObjWebDAVGUI::CMD_SAVE_SETTINGS = 'saveSettings'

Definition at line 18 of file class.ilObjWebDAVGUI.php.


The documentation for this class was generated from the following file: