ILIAS  release_8 Revision v8.23
ilObjSearchSettingsGUI Class Reference
+ Inheritance diagram for ilObjSearchSettingsGUI:
+ Collaboration diagram for ilObjSearchSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 redirectToSettings ()
 
 redirectToLuceneSettings ()
 
 getTabs ()
 
 advancedLuceneSettingsObject ()
 
 saveAdvancedLuceneSettingsObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

Factory $refinery
 
UIServices $ui
 
ilLogger $src_logger
 
ilObjUser $user
 
bool $read_only = true
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Attributes

GlobalHttpState $http
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

40  {
41  global $DIC;
42 
43  $this->http = $DIC->http();
44  $this->refinery = $DIC->refinery();
45  $this->ui = $DIC->ui();
46  $this->src_logger = $DIC->logger()->src();
47  $this->user = $DIC->user();
48 
49  $this->type = "seas";
50  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
51  $this->lng->loadLanguageModule('search');
52  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ advancedLuceneSettingsObject()

ilObjSearchSettingsGUI::advancedLuceneSettingsObject ( )
protected

Definition at line 206 of file class.ilObjSearchSettingsGUI.php.

References ilLuceneAdvancedSearchSettings\getInstance(), and ILIAS\Repository\lng().

Referenced by executeCommand().

206  : void
207  {
208  $this->tabs_gui->setTabActive('lucene_advanced_settings');
209 
210  $table = new ilLuceneAdvancedSearchActivationTableGUI($this, 'advancedLuceneSettings');
211  $table->setTitle($this->lng->txt('lucene_advanced_settings_table'));
213 
214  $this->tpl->setContent($table->getHTML());
215  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjSearchSettingsGUI::executeCommand ( )

Definition at line 54 of file class.ilObjSearchSettingsGUI.php.

References advancedLuceneSettingsObject(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilObjectGUI\prepareOutput(), redirectToLuceneSettings(), redirectToSettings(), ILIAS\Repository\refinery(), ILIAS\Repository\settings(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

54  : void
55  {
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58  $this->prepareOutput();
59 
60  switch ($next_class) {
61  case 'ilpermissiongui':
62  $this->tabs_gui->activateTab('perm_settings');
63  $perm_gui = new ilPermissionGUI($this);
64  $ret = $this->ctrl->forwardCommand($perm_gui);
65  return;
66 
67  case 'ilobjsearchsettingsformgui':
68  $this->tabs_gui->activateTab('settings');
69  $settings_gui = new ilObjSearchSettingsFormGUI(
70  $this->http,
71  $this->ctrl,
72  $this->lng,
73  $this->ui,
75  $this->settings,
76  $this->src_logger
77  )
78  );
79  $ret = $this->ctrl->forwardCommand($settings_gui);
80  return;
81 
82  case 'ilobjsearchlucenesettingsformgui':
83  $this->tabs_gui->activateTab('lucene_settings_tab');
84  $luc_settings_gui = new ilObjSearchLuceneSettingsFormGUI(
85  $this->http,
86  $this->ctrl,
87  $this->lng,
88  $this->ui,
89  $this->refinery,
90  $this->user,
92  $this->settings,
93  $this->src_logger
94  )
95  );
96  $ret = $this->ctrl->forwardCommand($luc_settings_gui);
97  return;
98  }
99 
100  switch ($cmd) {
101  case '':
102  case 'view':
103  case 'settings':
104  $this->redirectToSettings();
105  break;
106 
107  case 'luceneSettings':
108  $this->redirectToLuceneSettings();
109  break;
110 
111  case 'advancedLuceneSettings':
113  break;
114 
115  default:
116  $cmd .= "Object";
117  $this->$cmd();
118  }
119  }
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjSearchSettingsGUI::getAdminTabs ( )

Definition at line 163 of file class.ilObjSearchSettingsGUI.php.

References getTabs().

163  : void
164  {
165  $this->getTabs();
166  }
+ Here is the call graph for this function:

◆ getTabs()

ilObjSearchSettingsGUI::getTabs ( )
protected

Definition at line 168 of file class.ilObjSearchSettingsGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by getAdminTabs().

168  : void
169  {
170  if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
171  $this->tabs_gui->addTab(
172  'settings',
173  $this->lng->txt('settings'),
174  $this->ctrl->getLinkTarget($this, 'settings')
175  );
176  }
177 
178  if ($this->rbac_system->checkAccess('read', $this->object->getRefId())) {
179  $this->tabs_gui->addTab(
180  'lucene_advanced_settings',
181  $this->lng->txt('lucene_advanced_settings'),
182  $this->ctrl->getLinkTarget($this, 'advancedLuceneSettings')
183  );
184  }
185 
186  if ($this->rbac_system->checkAccess('read', $this->object->getRefId())) {
187  $this->tabs_gui->addTab(
188  'lucene_settings_tab',
189  $this->lng->txt('lucene_settings_tab'),
190  $this->ctrl->getLinkTarget($this, 'luceneSettings')
191  );
192  }
193 
194  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
195  $this->tabs_gui->addTab(
196  'perm_settings',
197  $this->lng->txt('perm_settings'),
198  $this->ctrl->getLinkTargetByClass(
199  [get_class($this),'ilpermissiongui'],
200  'perm'
201  ),
202  );
203  }
204  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToLuceneSettings()

ilObjSearchSettingsGUI::redirectToLuceneSettings ( )
protected

Definition at line 142 of file class.ilObjSearchSettingsGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

142  : void
143  {
144  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
145  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
146  }
147 
148  $this->tabs_gui->setTabActive('lucene_settings_tab');
149 
150  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
151  $this->ctrl->redirectByClass(
152  [get_class($this),'ilobjsearchlucenesettingsformgui'],
153  'readOnly'
154  );
155  }
156 
157  $this->ctrl->redirectByClass(
158  [get_class($this),'ilobjsearchlucenesettingsformgui'],
159  'edit'
160  );
161  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToSettings()

ilObjSearchSettingsGUI::redirectToSettings ( )
protected

Definition at line 121 of file class.ilObjSearchSettingsGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

121  : void
122  {
123  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
124  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
125  }
126 
127  $this->tabs_gui->setTabActive('settings');
128 
129  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
130  $this->ctrl->redirectByClass(
131  [get_class($this),'ilobjsearchsettingsformgui'],
132  'readOnly'
133  );
134  }
135 
136  $this->ctrl->redirectByClass(
137  [get_class($this),'ilobjsearchsettingsformgui'],
138  'edit'
139  );
140  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAdvancedLuceneSettingsObject()

ilObjSearchSettingsGUI::saveAdvancedLuceneSettingsObject ( )
protected

Definition at line 217 of file class.ilObjSearchSettingsGUI.php.

References ilObjectGUI\$settings, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilLuceneAdvancedSearchFields\getFields(), ilLuceneAdvancedSearchSettings\getInstance(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

217  : void
218  {
219  if (!$this->access->checkAccess('write', '', $this->object->getRefId())) {
220  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
221  $this->ctrl->redirect($this, 'settings');
222  }
223 
224  $enabled_md_ids = new SplFixedArray(0);
225  if ($this->http->wrapper()->post()->has('fid')) {
226  $enabled_md_ids = $this->http->wrapper()->post()->retrieve(
227  'fid',
228  $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
229  );
230  }
231 
233  foreach (ilLuceneAdvancedSearchFields::getFields() as $field => $translation) {
234  $settings->setActive($field, in_array($field, (array) $enabled_md_ids));
235  }
236  $settings->save();
237  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
238  $this->ctrl->redirect($this, 'advancedLuceneSettings');
239  }
static http()
Fetches the global http state from ILIAS.
static getFields()
Return an array of all meta data fields.
ilSetting $settings
+ Here is the call graph for this function:

Field Documentation

◆ $http

GlobalHttpState ilObjSearchSettingsGUI::$http
private

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

◆ $read_only

bool ilObjSearchSettingsGUI::$read_only = true
protected

Definition at line 37 of file class.ilObjSearchSettingsGUI.php.

◆ $refinery

Factory ilObjSearchSettingsGUI::$refinery
protected

Definition at line 32 of file class.ilObjSearchSettingsGUI.php.

◆ $src_logger

ilLogger ilObjSearchSettingsGUI::$src_logger
protected

Definition at line 34 of file class.ilObjSearchSettingsGUI.php.

◆ $ui

UIServices ilObjSearchSettingsGUI::$ui
protected

Definition at line 33 of file class.ilObjSearchSettingsGUI.php.

◆ $user

ilObjUser ilObjSearchSettingsGUI::$user
protected

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


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