ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjWebDAV.php
Go to the documentation of this file.
1<?php
2
8class ilObjWebDAV extends ilObject
9{
32
33
39 public function __construct($id = 0, bool $call_by_reference = true)
40 {
41 $this->type = "wbdv";
42 parent::__construct($id, $call_by_reference);
43 }
44
48 public function getPresentationTitle()
49 {
50 return $this->lng->txt("webdav");
51 }
52
56 public function getLongDescription()
57 {
58 return $this->lng->txt("webdav_description");
59 }
60
61
69 public function setWebdavEnabled($newValue)
70 {
71 $this->webdavEnabled = $newValue;
72 }
73
79 public function isWebdavEnabled()
80 {
82 }
83
84 public function setWebdavVersioningEnabled($newValue)
85 {
86 $this->webdavVersioningEnabled = $newValue;
87 }
88
89 public function isWebdavVersioningEnabled()
90 {
92 }
93
101 public function create()
102 {
103 parent::create();
104 $this->write();
105 }
106
107
113 public function update()
114 {
115 parent::update();
116 $this->write();
117 }
118
124 private function write()
125 {
126 global $DIC;
127 $settings = new ilSetting('webdav');
128
129 $settings->set('webdav_enabled', $this->webdavEnabled ? '1' : '0');
130 $settings->set('webdav_versioning_enabled', $this->webdavVersioningEnabled ? '1' : '0');
131 }
132
136 public function read()
137 {
138 parent::read();
139
140 global $DIC;
141 $settings = new ilSetting('webdav');
142 $this->webdavEnabled = $settings->get('webdav_enabled', '0') == '1';
143 // default_value = 1 for versionigEnabled because it was already standard before ilias5.4
144 $this->webdavVersioningEnabled = $settings->get('webdav_versioning_enabled', '1') == '1';
145 }
146}
An exception for terminatinating execution or to throw for unit testing.
$webdavVersioningEnabled
Boolean property.
getLongDescription()
@inheritDoc
read()
read object data from db into object
__construct($id=0, bool $call_by_reference=true)
ilObjWebDAV constructor.
$customWebfolderInstructionsEnabled
Boolean property.
isWebdavEnabled()
Gets the webdavEnabled property.
$customWebfolderInstructions
String property.
setWebdavEnabled($newValue)
Sets the webdavEnabled property.
$webdavActionsVisible
Boolean property.
update()
update object in db
getPresentationTitle()
@inheritDoc
setWebdavVersioningEnabled($newValue)
$webdavEnabled
Boolean property.
write()
write object data into db
Class ilObject Basic functions for all objects.
ILIAS Setting Class.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc