ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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 ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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
 

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.

References $GLOBALS.

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  $GLOBALS['ilLog']->write($this->lng->txt('sysc_overview'));
40  $GLOBALS['ilLog']->write($this->lng->txt('sysc_trash_restore'));
41 
42 
43 
44 
45  }
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

Member Function Documentation

◆ executeCommand()

ilObjSystemCheckGUI::executeCommand ( )

ilCtrl execute command

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

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

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

◆ getLang()

ilObjSystemCheckGUI::getLang ( )

Get language obj.

Returns
ilLanguage

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

References ilObjectGUI\$lng.

Referenced by overview(), and setSubTabs().

52  {
53  return $this->lng;
54  }
+ Here is the caller graph for this function:

◆ handleTrashAction()

ilObjSystemCheckGUI::handleTrashAction ( )
protected

Handle Trash action.

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

References $GLOBALS, IL_CAL_DATE, initFormTrash(), ilSystemCheckTrash\MODE_TRASH_REMOVE, ilUtil\sendFailure(), ilUtil\sendSuccess(), and trash().

271  {
272  $form = $this->initFormTrash();
273  if($form->checkInput())
274  {
275  $trash = new ilSystemCheckTrash();
276  $trash->setMode(ilSystemCheckTrash::MODE_TRASH_REMOVE);
277 
278  $dt_arr = $form->getInput('age');
279 
280  $GLOBALS['ilLog']->write(__METHOD__.': '.print_r($dt_arr,TRUE));
281 
282 
283  if($dt_arr['date'])
284  {
285  $trash->setAgeLimit(new ilDate($dt_arr['date'],IL_CAL_DATE));
286  }
287  $trash->setNumberLimit($form->getInput('number'));
288 
289  if($form->getInput('types'))
290  {
291  $trash->setTypesLimit((array) $form->getInput('types'));
292  }
293  $trash->setMode($form->getInput('type'));
294  $trash->start();
295 
296  ilUtil::sendSuccess($this->lng->txt('settings_saved'),TRUE);
297  $form->setValuesByPost();
298  $this->trash($form);
299  return TRUE;
300  }
301 
302  ilUtil::sendFailure($this->lng->txt('err_check_input'));
303  $form->setValuesByPost();
304  $this->trash($form);
305  return FALSE;
306  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initFormTrash()
Show trash restore form.
trash(ilPropertyFormGUI $form=null)
Show trash form.
Class for single dates.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const IL_CAL_DATE
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ Here is the call graph for this function:

◆ initFormTrash()

ilObjSystemCheckGUI::initFormTrash ( )
protected

Show trash restore form.

Returns
ilPropertyFormGUI

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

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

Referenced by handleTrashAction(), and trash().

199  {
200  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
201  $form = new ilPropertyFormGUI();
202  $form->setFormAction($this->ctrl->getFormAction($this));
203 
204  $form->setTitle($this->lng->txt('sysc_administrate_deleted'));
205 
206  $action = new ilRadioGroupInputGUI($this->lng->txt('sysc_trash_action'), 'type');
207  $action->setRequired(TRUE);
208 
209  // Restore
210  $restore = new ilRadioOption($this->lng->txt('sysc_trash_restore'), ilSystemCheckTrash::MODE_TRASH_RESTORE);
211  $restore->setInfo($this->lng->txt('sysc_trash_restore_info'));
212  $action->addOption($restore);
213 
214  // Remove
215  $remove = new ilRadioOption($this->lng->txt('sysc_trash_remove'), ilSystemCheckTrash::MODE_TRASH_REMOVE);
216  $remove->setInfo($this->lng->txt('sysc_trash_remove_info'));
217  $action->addOption($remove);
218 
219  // limit number
220  $num = new ilNumberInputGUI($this->lng->txt('sysc_trash_limit_num'), 'number');
221  $num->setInfo($this->lng->txt('purge_count_limit_desc'));
222  $num->setSize(10);
223  $num->setMinValue(1);
224  $remove->addSubItem($num);
225 
226  $age = new ilDateTimeInputGUI($this->lng->txt('sysc_trash_limit_age'), 'age');
227  $age->setInfo($this->lng->txt('purge_age_limit_desc'));
228  $age->setMinuteStepSize(15);
229  $age->setMode(ilDateTimeInputGUI::MODE_INPUT);
230  #$earlier = new ilDateTime(time(),IL_CAL_UNIX);
231  #$earlier->increment(IL_CAL_MONTH,-6);
232  #$age->setDate($earlier);
233  $remove->addSubItem($age);
234 
235  // limit types
236  $types = new ilSelectInputGUI($this->lng->txt('sysc_trash_limit_type'), 'types');
237  /*
238  * @var ilObjDefinition
239  */
240  $sub_objects = $GLOBALS['tree']->lookupTrashedObjectTypes();
241 
242  $options = array();
243  $options[0] = '';
244  foreach($sub_objects as $obj_type)
245  {
246  if(!$GLOBALS['objDefinition']->isRBACObject($obj_type) or !$GLOBALS['objDefinition']->isAllowedInRepository($obj_type))
247  {
248  continue;
249  }
250  $options[$obj_type] = $this->lng->txt('obj_'.$obj_type);
251  }
252 
253  asort($options);
254 
255  $types->setOptions($options);
256  $remove->addSubItem($types);
257 
258  $form->addItem($action);
259 
260 
261  $form->addCommandButton('handleTrashAction', $this->lng->txt('start_scan'));
262  $form->addCommandButton('',$this->lng->txt('cancel'));
263 
264  return $form;
265  }
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.
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.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
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 140 of file class.ilObjSystemCheckGUI.php.

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

141  {
142  $this->getLang()->loadLanguageModule('sysc');
143 
144 
145  $this->setSubTabs(self::SECTION_MAIN, 'overview');
146 
147 
148  include_once 'Services/SystemCheck/classes/class.ilSCGroupTableGUI.php';
149 
150  $table = new ilSCGroupTableGUI($this,'overview');
151  $table->init();
152  $table->parse();
153 
154  $GLOBALS['tpl']->setContent($table->getHTML());
155  return true;
156  }
setSubTabs($a_section, $a_active)
Set subtabs.
Table GUI for system check groups overview.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ 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 313 of file class.ilObjSystemCheckGUI.php.

References $GLOBALS, and getLang().

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

314  {
315  switch($a_section)
316  {
317  case self::SECTION_MAIN:
318  $GLOBALS['ilTabs']->addSubTab(
319  '',
320  $this->getLang()->txt('sysc_groups'),
321  $this->ctrl->getLinkTarget($this,'overview')
322  );
323  $GLOBALS['ilTabs']->addSubTab(
324  'trash',
325  $this->getLang()->txt('sysc_tab_trash'),
326  $this->ctrl->getLinkTarget($this,'trash')
327  );
328  $GLOBALS['ilTabs']->addSubTab(
329  'no_owner',
330  $this->getLang()->txt('system_check_no_owner'),
331  $this->ctrl->getLinkTargetByClass('ilobjectownershipmanagementgui')
332  );
333  break;
334 
335  case self::SECTION_GROUP:
336  $GLOBALS['ilTabs']->clearTargets();
337  $GLOBALS['ilTabs']->setBackTarget(
338  $this->lng->txt('back'),
339  $this->ctrl->getLinkTarget($this,'overview')
340  );
341  }
342  $GLOBALS['ilTabs']->activateSubTab($a_active);
343  }
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ 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 161 of file class.ilObjSystemCheckGUI.php.

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

162  {
163  $this->setSubTabs(self::SECTION_GROUP, '');
164 
165  $grp_id = (int) $_REQUEST['grp_id'];
166  $this->ctrl->saveParameter($this, 'grp_id');
167 
168  include_once 'Services/SystemCheck/classes/class.ilSCTaskTableGUI.php';
169  $table = new ilSCTaskTableGUI($grp_id,$this,'showGroup');
170  $table->init();
171  $table->parse();
172 
173  $GLOBALS['tpl']->setContent($table->getHTML());
174  return true;
175  }
setSubTabs($a_section, $a_active)
Set subtabs.
Table GUI for system check task overview.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ Here is the call graph for this function:

◆ trash()

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

Show trash form.

Parameters
ilPropertyFormGUI$form

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

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

Referenced by handleTrashAction().

185  {
186  $this->setSubTabs(self::SECTION_MAIN,'trash');
187  if(!$form instanceof ilPropertyFormGUI)
188  {
189  $form = $this->initFormTrash();
190  }
191  $GLOBALS['tpl']->setContent($form->getHTML());
192  }
This class represents a property form user interface.
initFormTrash()
Show trash restore form.
setSubTabs($a_section, $a_active)
Set subtabs.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ 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: