ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjSystemCheckGUI Class Reference
+ Inheritance diagram for ilObjSystemCheckGUI:
+ Collaboration diagram for ilObjSystemCheckGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 
 getLang ()
 Get language obj. More...
 
 executeCommand ()
 ilCtrl execute command 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...
 
 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 ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Data Fields

const SECTION_MAIN = 'main'
 
const SECTION_GROUP = 'group'
 
 $ctrl
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $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

 overview ()
 Show overview table. More...
 
 showGroup ()
 Show group tasks. More...
 
 trash (ilPropertyFormGUI $form=null)
 Show trash form. More...
 
 initFormTrash ()
 Show trash restore form. More...
 
 handleTrashAction ()
 Handle Trash action. More...
 
 setSubTabs ($a_section, $a_active)
 Set subtabs. More...
 
- Protected Member Functions inherited from ilObjectGUI
 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...
 
 showMountWebfolderIcon ()
 
 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...
 
 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...
 
 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...
 

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...
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSystemCheckGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)
Parameters
$a_data
$a_id
$a_call_by_reference
bool$a_prepare_output

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

34  {
35 
36  $this->type = 'sysc';
37  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
38  $this->lng->loadLanguageModule('sysc');
39  }

Member Function Documentation

◆ executeCommand()

ilObjSystemCheckGUI::executeCommand ( )

ilCtrl execute command

Definition at line 53 of file class.ilObjSystemCheckGUI.php.

References $cmd, $GLOBALS, array, ilObjectGUI\getAdminTabs(), ilSCComponentTaskFactory\getComponentTask(), ilObjectGUI\prepareOutput(), and setSubTabs().

54  {
55  $next_class = $this->ctrl->getNextClass($this);
56  $cmd = $this->ctrl->getCmd();
57  $this->prepareOutput();
58 
59  switch($next_class)
60  {
61  case "ilobjectownershipmanagementgui":
62  $this->setSubTabs(self::SECTION_MAIN,'no_owner');
63  include_once 'Services/Object/classes/class.ilObjectOwnershipManagementGUI.php';
64  $gui = new ilObjectOwnershipManagementGUI(0);
65  $this->ctrl->forwardCommand($gui);
66  break;
67 
68  case 'ilobjsystemfoldergui':
69  include_once './Modules/SystemFolder/classes/class.ilObjSystemFolderGUI.php';
70  $sys_folder = new ilObjSystemFolderGUI('',SYSTEM_FOLDER_ID,TRUE);
71  $this->ctrl->forwardCommand($sys_folder);
72 
73  $GLOBALS['ilTabs']->clearTargets();
74 
75  $this->setSubTabs(self::SECTION_MAIN,'sc');
76  break;
77 
78  case 'ilpermissiongui':
79  $this->tabs_gui->setTabActive('perm_settings');
80  require_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
81  $perm_gui = new ilPermissionGUI($this);
82  $this->ctrl->forwardCommand($perm_gui);
83  break;
84 
85  case '':
86  case 'ilobjsystemcheckgui':
87  if($cmd == '' || $cmd == 'view')
88  {
89  $cmd = 'overview';
90  }
91  $this->$cmd();
92  break;
93 
94  default:
95  // Forward to task handler
96  include_once './Services/SystemCheck/classes/class.ilSCComponentTaskFactory.php';
97  $this->ctrl->saveParameter($this,'grp_id');
98  $this->ctrl->saveParameter($this, 'task_id');
99  $this->ctrl->setReturn($this,'showGroup');
100  $GLOBALS['ilTabs']->clearTargets();
101  $GLOBALS['ilTabs']->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,'showGroup'));
102  $handler = ilSCComponentTaskFactory::getComponentTask((int) $_REQUEST['task_id']);
103  $this->ctrl->forwardCommand($handler);
104  break;
105 
106 
107  }
108  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$cmd
Definition: sahs_server.php:35
Class ilObjectOwnershipManagementGUI.
Class ilObjSystemFolderGUI.
setSubTabs($a_section, $a_active)
Set subtabs.
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getLang()

ilObjSystemCheckGUI::getLang ( )

Get language obj.

Returns
ilLanguage

Definition at line 45 of file class.ilObjSystemCheckGUI.php.

References ilObjectGUI\$lng.

Referenced by overview(), and setSubTabs().

46  {
47  return $this->lng;
48  }
+ Here is the caller graph for this function:

◆ handleTrashAction()

ilObjSystemCheckGUI::handleTrashAction ( )
protected

Handle Trash action.

Definition at line 263 of file class.ilObjSystemCheckGUI.php.

References array, initFormTrash(), ilSystemCheckTrash\MODE_TRASH_REMOVE, ilUtil\sendFailure(), ilUtil\sendSuccess(), and trash().

264  {
265  $form = $this->initFormTrash();
266  if($form->checkInput())
267  {
268  $trash = new ilSystemCheckTrash();
269  $trash->setMode(ilSystemCheckTrash::MODE_TRASH_REMOVE);
270  $dt = $form->getItemByPostVar('age')->getDate();
271  if($dt)
272  {
273  $trash->setAgeLimit($dt);
274  }
275  $trash->setNumberLimit($form->getInput('number'));
276 
277  if($form->getInput('types'))
278  {
279  $trash->setTypesLimit((array) $form->getInput('types'));
280  }
281  $trash->setMode($form->getInput('type'));
282  $trash->start();
283 
284  ilUtil::sendSuccess($this->lng->txt('settings_saved'),TRUE);
285  $form->setValuesByPost();
286  $this->trash($form);
287  return TRUE;
288  }
289 
290  ilUtil::sendFailure($this->lng->txt('err_check_input'));
291  $form->setValuesByPost();
292  $this->trash($form);
293  return FALSE;
294  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initFormTrash()
Show trash restore form.
trash(ilPropertyFormGUI $form=null)
Show trash form.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ initFormTrash()

ilObjSystemCheckGUI::initFormTrash ( )
protected

Show trash restore form.

Returns
ilPropertyFormGUI

Definition at line 192 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, $options, ilObjectGUI\$sub_objects, array, ilSystemCheckTrash\MODE_TRASH_REMOVE, ilSystemCheckTrash\MODE_TRASH_RESTORE, ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), and ilFormPropertyGUI\setRequired().

Referenced by handleTrashAction(), and trash().

193  {
194  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
195  $form = new ilPropertyFormGUI();
196  $form->setFormAction($this->ctrl->getFormAction($this));
197 
198  $form->setTitle($this->lng->txt('sysc_administrate_deleted'));
199 
200  $action = new ilRadioGroupInputGUI($this->lng->txt('sysc_trash_action'), 'type');
201  $action->setRequired(TRUE);
202 
203  // Restore
204  $restore = new ilRadioOption($this->lng->txt('sysc_trash_restore'), ilSystemCheckTrash::MODE_TRASH_RESTORE);
205  $restore->setInfo($this->lng->txt('sysc_trash_restore_info'));
206  $action->addOption($restore);
207 
208  // Remove
209  $remove = new ilRadioOption($this->lng->txt('sysc_trash_remove'), ilSystemCheckTrash::MODE_TRASH_REMOVE);
210  $remove->setInfo($this->lng->txt('sysc_trash_remove_info'));
211  $action->addOption($remove);
212 
213  // limit number
214  $num = new ilNumberInputGUI($this->lng->txt('sysc_trash_limit_num'), 'number');
215  $num->setInfo($this->lng->txt('purge_count_limit_desc'));
216  $num->setSize(10);
217  $num->setMinValue(1);
218  $remove->addSubItem($num);
219 
220  $age = new ilDateTimeInputGUI($this->lng->txt('sysc_trash_limit_age'), 'age');
221  $age->setInfo($this->lng->txt('purge_age_limit_desc'));
222  $age->setMinuteStepSize(15);
223  #$earlier = new ilDateTime(time(),IL_CAL_UNIX);
224  #$earlier->increment(IL_CAL_MONTH,-6);
225  #$age->setDate($earlier);
226  $remove->addSubItem($age);
227 
228  // limit types
229  $types = new ilSelectInputGUI($this->lng->txt('sysc_trash_limit_type'), 'types');
230  /*
231  * @var ilObjDefinition
232  */
233  $sub_objects = $GLOBALS['tree']->lookupTrashedObjectTypes();
234 
235  $options = array();
236  $options[0] = '';
237  foreach($sub_objects as $obj_type)
238  {
239  if(!$GLOBALS['objDefinition']->isRBACObject($obj_type) or !$GLOBALS['objDefinition']->isAllowedInRepository($obj_type))
240  {
241  continue;
242  }
243  $options[$obj_type] = $this->lng->txt('obj_'.$obj_type);
244  }
245 
246  asort($options);
247 
248  $types->setOptions($options);
249  $remove->addSubItem($types);
250 
251  $form->addItem($action);
252 
253 
254  $form->addCommandButton('handleTrashAction', $this->lng->txt('start_scan'));
255  $form->addCommandButton('',$this->lng->txt('cancel'));
256 
257  return $form;
258  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setInfo($a_info)
Set Info.
This class represents a date/time property in a property form.
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
if(!is_array($argv)) $options
This class represents a number property in a property form.
Create styles array
The data for the language used.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ overview()

ilObjSystemCheckGUI::overview ( )
protected

Show overview table.

Definition at line 134 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, getLang(), and setSubTabs().

135  {
136  $this->getLang()->loadLanguageModule('sysc');
137 
138 
139  $this->setSubTabs(self::SECTION_MAIN, 'overview');
140 
141 
142  include_once 'Services/SystemCheck/classes/class.ilSCGroupTableGUI.php';
143 
144  $table = new ilSCGroupTableGUI($this,'overview');
145  $table->init();
146  $table->parse();
147 
148  $GLOBALS['tpl']->setContent($table->getHTML());
149  return true;
150  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_section, $a_active)
Set subtabs.
Table GUI for system check groups overview.
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjSystemCheckGUI::setSubTabs (   $a_section,
  $a_active 
)
protected

Set subtabs.

Parameters
type$a_section

Definition at line 301 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, and getLang().

Referenced by executeCommand(), overview(), showGroup(), and trash().

302  {
303  switch($a_section)
304  {
305  case self::SECTION_MAIN:
306  $GLOBALS['ilTabs']->addSubTab(
307  '',
308  $this->getLang()->txt('sysc_groups'),
309  $this->ctrl->getLinkTarget($this,'overview')
310  );
311  $GLOBALS['ilTabs']->addSubTab(
312  'trash',
313  $this->getLang()->txt('sysc_tab_trash'),
314  $this->ctrl->getLinkTarget($this,'trash')
315  );
316  $GLOBALS['ilTabs']->addSubTab(
317  'no_owner',
318  $this->getLang()->txt('system_check_no_owner'),
319  $this->ctrl->getLinkTargetByClass('ilobjectownershipmanagementgui')
320  );
321  break;
322 
323  case self::SECTION_GROUP:
324  $GLOBALS['ilTabs']->clearTargets();
325  $GLOBALS['ilTabs']->setBackTarget(
326  $this->lng->txt('back'),
327  $this->ctrl->getLinkTarget($this,'overview')
328  );
329  }
330  $GLOBALS['ilTabs']->activateSubTab($a_active);
331  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showGroup()

ilObjSystemCheckGUI::showGroup ( )
protected

Show group tasks.

Definition at line 155 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, and setSubTabs().

156  {
157  $this->setSubTabs(self::SECTION_GROUP, '');
158 
159  $grp_id = (int) $_REQUEST['grp_id'];
160  $this->ctrl->saveParameter($this, 'grp_id');
161 
162  include_once 'Services/SystemCheck/classes/class.ilSCTaskTableGUI.php';
163  $table = new ilSCTaskTableGUI($grp_id,$this,'showGroup');
164  $table->init();
165  $table->parse();
166 
167  $GLOBALS['tpl']->setContent($table->getHTML());
168  return true;
169  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setSubTabs($a_section, $a_active)
Set subtabs.
Table GUI for system check task overview.
+ Here is the call graph for this function:

◆ trash()

ilObjSystemCheckGUI::trash ( ilPropertyFormGUI  $form = null)
protected

Show trash form.

Parameters
ilPropertyFormGUI$form

Definition at line 178 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, initFormTrash(), and setSubTabs().

Referenced by handleTrashAction().

179  {
180  $this->setSubTabs(self::SECTION_MAIN,'trash');
181  if(!$form instanceof ilPropertyFormGUI)
182  {
183  $form = $this->initFormTrash();
184  }
185  $GLOBALS['tpl']->setContent($form->getHTML());
186  }
This class represents a property form user interface.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
initFormTrash()
Show trash restore form.
setSubTabs($a_section, $a_active)
Set subtabs.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilObjSystemCheckGUI::$ctrl

Definition at line 25 of file class.ilObjSystemCheckGUI.php.

◆ SECTION_GROUP

const ilObjSystemCheckGUI::SECTION_GROUP = 'group'

Definition at line 19 of file class.ilObjSystemCheckGUI.php.

◆ SECTION_MAIN

const ilObjSystemCheckGUI::SECTION_MAIN = 'main'

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


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