ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjAccessibilitySettingsGUI Class Reference

Accessibility Settings. More...

+ Inheritance diagram for ilObjAccessibilitySettingsGUI:
+ Collaboration diagram for ilObjAccessibilitySettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 saveAccessibilitySettings ()
 Save accessibility settings form. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editAccessKeys ()
 Edit access keys. More...
 
 saveAccessKeys ()
 Save access keys. 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 ()
 

Protected Member Functions

 getSettingsForm ()
 
 editAccessibilitySettings (ilPropertyFormGUI $form=null)
 
- 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

 $dic
 
 $rbacsystem
 
 $error
 
 $access
 
 $tabs
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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...
 
- Data Fields inherited from ilObjectGUI
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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjAccessibilitySettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

public

Definition at line 49 of file class.ilObjAccessibilitySettingsGUI.php.

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

50  {
51  global $DIC;
52 
53  $this->dic = $DIC;
54  $this->rbacsystem = $DIC->rbac()->system();
55  $this->error = $DIC["ilErr"];
56  $this->access = $DIC->access();
57  $this->tabs = $DIC->tabs();
58  $this->tpl = $DIC["tpl"];
59  $this->ctrl = $DIC->ctrl();
60  $this->lng = $DIC->language();
61  $this->type = 'accs';
62  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
63 
64  $this->lng->loadLanguageModule('acc');
65  $this->lng->loadLanguageModule('adm');
66  $this->lng->loadLanguageModule('meta');
67  }
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ editAccessibilitySettings()

ilObjAccessibilitySettingsGUI::editAccessibilitySettings ( ilPropertyFormGUI  $form = null)
protected
Parameters
ilPropertyFormGUI$form

Definition at line 209 of file class.ilObjAccessibilitySettingsGUI.php.

References getSettingsForm().

210  {
211  $this->tabs_gui->setTabActive('acc_settings');
212  if (!$form) {
213  $this->form = $this->getSettingsForm();
214  }
215 
216  $this->tpl->setContent($this->form->getHTML());
217  }
+ Here is the call graph for this function:

◆ editAccessKeys()

ilObjAccessibilitySettingsGUI::editAccessKeys ( )

Edit access keys.

Definition at line 264 of file class.ilObjAccessibilitySettingsGUI.php.

References ilObjectGUI\$tpl.

265  {
266  $tpl = $this->tpl;
267 
268  $this->tabs_gui->setTabActive('acc_access_keys');
269 
270  include_once("./Services/Accessibility/classes/class.ilAccessKeyTableGUI.php");
271  $table = new ilAccessKeyTableGUI($this, "editAccessKeys");
272 
273  $tpl->setContent($table->getHTML());
274  }
TableGUI class for access keys.

◆ executeCommand()

ilObjAccessibilitySettingsGUI::executeCommand ( )

Execute command.

public

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

References $access, $error, ilObjectGUI\$ilErr, $rbacsystem, $ret, and ilObjectGUI\prepareOutput().

76  {
79  $ilAccess = $this->access;
80 
81  $next_class = $this->ctrl->getNextClass($this);
82  $cmd = $this->ctrl->getCmd();
83 
84  $this->prepareOutput();
85 
86  if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
87  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
88  }
89 
90  switch ($next_class) {
91  case 'ilpermissiongui':
92  $this->tabs_gui->setTabActive('perm_settings');
93  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
94  $perm_gui = new ilPermissionGUI($this);
95  $ret = $this->ctrl->forwardCommand($perm_gui);
96  break;
97 
98  case 'ilaccessibilitydocumentgui':
99  $this->tabs_gui->activateTab('acc_ctrl_cpt');
100 
101  $tableDataProviderFactory = new ilAccessibilityTableDataProviderFactory();
102  $tableDataProviderFactory->setDatabaseAdapter($this->dic->database());
103 
104  $documentGui = new ilAccessibilityDocumentGUI(
105  $this->object,
106  $this->dic['acc.criteria.type.factory'],
107  $this->dic->ui()->mainTemplate(),
108  $this->dic->user(),
109  $this->dic->ctrl(),
110  $this->dic->language(),
111  $this->dic->rbac()->system(),
112  $this->dic['ilErr'],
113  $this->dic->logger()->acc(),
114  $this->dic->toolbar(),
115  $this->dic->http(),
116  $this->dic->ui()->factory(),
117  $this->dic->ui()->renderer(),
118  $this->dic->filesystem(),
119  $this->dic->upload(),
120  $tableDataProviderFactory,
122  );
123 
124  $this->ctrl->forwardCommand($documentGui);
125  break;
126 
127  default:
128  if (!$cmd || $cmd == 'view') {
129  $cmd = "editAccessibilitySettings";
130  }
131 
132  $this->$cmd();
133  break;
134  }
135  return true;
136  }
Class ilAccessibilityDocumentHtmlPurifier.
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilAccessibilityDocumentGUI.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAccessibilitySettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 225 of file class.ilObjAccessibilitySettingsGUI.php.

References $access, $rbacsystem, and $tabs.

226  {
228  $ilAccess = $this->access;
229  $ilTabs = $this->tabs;
230 
231  if ($rbacsystem->checkAccess("read", $this->object->getRefId())) {
232  $ilTabs->addTab('acc_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editAccessibilitySettings'));
233  }
234 
235  if ($rbacsystem->checkAccess("read", $this->object->getRefId())) {
236  $ilTabs->addTarget(
237  "acc_access_keys",
238  $this->ctrl->getLinkTarget($this, "editAccessKeys"),
239  array("editAccessKeys", "view")
240  );
241  }
242 
243  if ($rbacsystem->checkAccess("read", $this->object->getRefId())) {
244  $ilTabs->addTab(
245  'acc_ctrl_cpt',
246  $this->lng->txt('acc_ctrl_cpt_txt'),
247  $this->ctrl->getLinkTargetByClass('ilaccessibilitydocumentgui')
248  );
249  }
250 
251  if ($rbacsystem->checkAccess("edit_permission", $this->object->getRefId())) {
252  $ilTabs->addTarget(
253  "perm_settings",
254  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
255  array(),
256  'ilpermissiongui'
257  );
258  }
259  }

◆ getSettingsForm()

ilObjAccessibilitySettingsGUI::getSettingsForm ( )
protected
Returns
ilPropertyFormGUI

Definition at line 141 of file class.ilObjAccessibilitySettingsGUI.php.

References ilAdministrationSettingsFormHandler\addFieldsToForm(), ilAdministrationSettingsFormHandler\FORM_ACCESSIBILITY, ilObjAccessibilitySettings\getControlConceptStatus(), ilAccessibilitySupportContacts\getList(), and ilCheckboxInputGUI\setValue().

Referenced by editAccessibilitySettings(), and saveAccessibilitySettings().

142  {
143  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
144  $this->form = new ilPropertyFormGUI();
145  $this->form->setTitle($this->lng->txt('settings'));
146 
147  $cb = new ilCheckboxInputGUI($this->lng->txt('adm_acc_ctrl_cpt_enable'), 'acc_ctrl_cpt_status');
148  $cb->setValue(1);
150  $cb->setInfo($this->lng->txt('adm_acc_ctrl_cpt_desc'));
151  $this->form->addItem($cb);
152 
153  $ti = new ilTextInputGUI($this->lng->txt("adm_accessibility_contacts"), "accessibility_support_contacts");
154  $ti->setMaxLength(500);
156  $ti->setInfo($this->lng->txt("adm_accessibility_contacts_info"));
157  $this->form->addItem($ti);
158 
159  $se = new ilFormSectionHeaderGUI();
160  $se ->setTitle($this->lng->txt('obj_accs_captcha'));
161  $this->form->addItem($se);
162 
163  require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
166  $this->form,
167  $this
168  );
169 
170  $this->form->addCommandButton("saveAccessibilitySettings", $this->lng->txt("save"));
171  $this->form->setFormAction($this->ctrl->getFormAction($this));
172 
173  return $this->form;
174  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
setValue($a_value)
Set Value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAccessibilitySettings()

ilObjAccessibilitySettingsGUI::saveAccessibilitySettings ( )

Save accessibility settings form.

Definition at line 179 of file class.ilObjAccessibilitySettingsGUI.php.

References $_POST, ilObjectGUI\$ctrl, $error, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, $rbacsystem, ilObjectGUI\$tpl, getSettingsForm(), ilObjAccessibilitySettings\saveControlConceptStatus(), and ilAccessibilitySupportContacts\setList().

180  {
181  $tpl = $this->tpl;
182  $lng = $this->lng;
186 
187  if (!$rbacsystem->checkAccess("write", $this->object->getRefId())) {
188  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
189  }
190 
191  $this->getSettingsForm();
192  if ($this->form->checkInput()) {
193  // Accessibility Control Concept status
194  ilObjAccessibilitySettings::saveControlConceptStatus((bool) $this->form->getInput('acc_ctrl_cpt_status'));
195  // Accessibility support contacts
196  ilAccessibilitySupportContacts::setList($_POST["accessibility_support_contacts"]);
197 
198  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
199  $ilCtrl->redirect($this, "editAccessibilitySettings");
200  } else {
201  $this->form->setValuesByPost();
202  $tpl->setContent($this->form->getHtml());
203  }
204  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ saveAccessKeys()

ilObjAccessibilitySettingsGUI::saveAccessKeys ( )

Save access keys.

Definition at line 279 of file class.ilObjAccessibilitySettingsGUI.php.

References $_GET, $_POST, $access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilUtil\stripSlashesArray(), and ilAccessKey\writeKeys().

280  {
282  $lng = $this->lng;
283  $ilAccess = $this->access;
284 
285  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
286  include_once("./Services/Accessibility/classes/class.ilAccessKey.php");
288  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
289  }
290  $ilCtrl->redirect($this, "editAccessKeys");
291  }
$_GET["client_id"]
static writeKeys($a_keys, $a_lang_key="0")
Write keys.
global $ilCtrl
Definition: ilias.php:18
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilObjAccessibilitySettingsGUI::$access
protected

◆ $dic

ilObjAccessibilitySettingsGUI::$dic
protected

Definition at line 22 of file class.ilObjAccessibilitySettingsGUI.php.

◆ $error

ilObjAccessibilitySettingsGUI::$error
protected

◆ $rbacsystem

ilObjAccessibilitySettingsGUI::$rbacsystem
protected

◆ $tabs

ilObjAccessibilitySettingsGUI::$tabs
protected

Definition at line 42 of file class.ilObjAccessibilitySettingsGUI.php.

Referenced by getAdminTabs().


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