4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
38 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
43 $this->rbacsystem = $DIC->rbac()->system();
44 $this->error = $DIC[
"ilErr"];
45 $this->access = $DIC->access();
46 $this->lng = $DIC->language();
47 $this->ctrl = $DIC->ctrl();
48 $this->tabs = $DIC->tabs();
49 $this->toolbar = $DIC->toolbar();
50 $this->tpl = $DIC[
"tpl"];
78 $lng->loadLanguageModule(
"wiki");
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
85 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
86 $ilErr->raiseError($this->lng->txt(
'no_permission'),
$ilErr->WARNING);
89 switch ($next_class) {
90 case 'ilpermissiongui':
91 $this->tabs_gui->setTabActive(
'perm_settings');
92 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
94 $ret = $this->ctrl->forwardCommand($perm_gui);
98 if (!$cmd || $cmd ==
'view') {
99 $cmd =
"editSettings";
119 $ilTabs->activateTab(
"settings");
121 if ($this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
126 $tpl->setContent($form->getHTML());
135 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
138 'activate_captcha_anonym' => ilCaptchaUtil::isActiveForWiki()
151 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
154 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
155 $cap =
new ilCheckboxInputGUI($this->lng->txt(
'adm_captcha_anonymous_short'),
'activate_captcha_anonym');
156 $cap->
setInfo($this->lng->txt(
'adm_captcha_anonymous_wiki'));
159 $cap->setAlert(ilCaptchaUtil::getPreconditionsMessage());
161 $form->addItem($cap);
164 $form->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
167 $form->setTitle(
$lng->txt(
"settings"));
168 $form->setFormAction(
$ilCtrl->getFormAction($this));
176 protected function saveSettings()
191 if (!$form->checkInput()) {
192 $form->setValuesByPost();
197 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
198 ilCaptchaUtil::setActiveForWiki((
bool) $form->getInput(
'activate_captcha_anonym'));
200 ilUtil::sendSuccess(
$lng->txt(
'msg_obj_modified'),
true);
201 $ilCtrl->redirect($this,
'editSettings');
210 $this->tabs_gui->addTab(
212 $this->lng->txt(
"settings"),
213 $this->ctrl->getLinkTarget($this,
"editSettings")
218 $this->tabs_gui->addTab(
220 $this->lng->txt(
"perm_settings"),
221 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
232 switch ($a_form_id) {
234 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
239 return array(
'obj_wiks' => array(
'editSettings', $fields));
getAdminTabs()
administration tabs show only permissions and trash folder
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
static checkFreetype()
Check whether captcha support is active.
editSettings(ilPropertyFormGUI $form=null)
executeCommand()
Execute command.
__construct(Container $dic, ilPlugin $plugin)
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
populateWithCurrentSettings(ilPropertyFormGUI $form)
addToExternalSettingsForm($a_form_id)