ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 @access 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 ()
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Data Fields

const SECTION_MAIN = 'main'
 
const SECTION_GROUP = 'group'
 
 $ctrl
 
- 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
 

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
 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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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...
 

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
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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 $this->type = 'sysc';
36 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
37 $this->lng->loadLanguageModule('sysc');
38 }

Member Function Documentation

◆ executeCommand()

ilObjSystemCheckGUI::executeCommand ( )

ilCtrl execute command

Reimplemented from ilObjectGUI.

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

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

References $GLOBALS, $handler, ilSCComponentTaskFactory\getComponentTask(), ilObjectGUI\prepareOutput(), and setSubTabs().

+ Here is the call graph for this function:

◆ getLang()

ilObjSystemCheckGUI::getLang ( )

Get language obj.

Returns
ilLanguage

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

45 {
46 return $this->lng;
47 }

References ilObjectGUI\$lng.

Referenced by overview(), and setSubTabs().

+ Here is the caller graph for this function:

◆ handleTrashAction()

ilObjSystemCheckGUI::handleTrashAction ( )
protected

Handle Trash action.

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

258 {
259 $form = $this->initFormTrash();
260 if ($form->checkInput()) {
261 $trash = new ilSystemCheckTrash();
263 $dt = $form->getItemByPostVar('age')->getDate();
264 if ($dt) {
265 $trash->setAgeLimit($dt);
266 }
267 $trash->setNumberLimit($form->getInput('number'));
268
269 if ($form->getInput('types')) {
270 $trash->setTypesLimit((array) $form->getInput('types'));
271 }
272 $trash->setMode($form->getInput('type'));
273 $trash->start();
274
275 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
276 $form->setValuesByPost();
277 $this->trash($form);
278 return true;
279 }
280
281 ilUtil::sendFailure($this->lng->txt('err_check_input'));
282 $form->setValuesByPost();
283 $this->trash($form);
284 return false;
285 }
trash(ilPropertyFormGUI $form=null)
Show trash form.
initFormTrash()
Show trash restore form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(isset($_POST['submit'])) $form

References $form, initFormTrash(), ilSystemCheckTrash\MODE_TRASH_REMOVE, ilUtil\sendFailure(), and trash().

+ Here is the call graph for this function:

◆ initFormTrash()

ilObjSystemCheckGUI::initFormTrash ( )
protected

Show trash restore form.

Returns
ilPropertyFormGUI

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

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

References $action, $form, $GLOBALS, PHPMailer\PHPMailer\$options, ilObjectGUI\$sub_objects, ilSystemCheckTrash\MODE_TRASH_REMOVE, and ilSystemCheckTrash\MODE_TRASH_RESTORE.

Referenced by handleTrashAction(), and trash().

+ Here is the caller graph for this function:

◆ overview()

ilObjSystemCheckGUI::overview ( )
protected

Show overview table.

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

132 {
133 $this->getLang()->loadLanguageModule('sysc');
134
135
136 $this->setSubTabs(self::SECTION_MAIN, 'overview');
137
138
139 include_once 'Services/SystemCheck/classes/class.ilSCGroupTableGUI.php';
140
141 $table = new ilSCGroupTableGUI($this, 'overview');
142 $table->init();
143 $table->parse();
144
145 $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
146 return true;
147 }
Table GUI for system check groups overview.
if(empty($password)) $table
Definition: pwgen.php:24

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

+ 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 292 of file class.ilObjSystemCheckGUI.php.

293 {
294 switch ($a_section) {
296 $GLOBALS['DIC']['ilTabs']->addSubTab(
297 '',
298 $this->getLang()->txt('sysc_groups'),
299 $this->ctrl->getLinkTarget($this, 'overview')
300 );
301 $GLOBALS['DIC']['ilTabs']->addSubTab(
302 'trash',
303 $this->getLang()->txt('sysc_tab_trash'),
304 $this->ctrl->getLinkTarget($this, 'trash')
305 );
306 $GLOBALS['DIC']['ilTabs']->addSubTab(
307 'no_owner',
308 $this->getLang()->txt('system_check_no_owner'),
309 $this->ctrl->getLinkTargetByClass('ilobjectownershipmanagementgui')
310 );
311 break;
312
314 $GLOBALS['DIC']['ilTabs']->clearTargets();
315 $GLOBALS['DIC']['ilTabs']->setBackTarget(
316 $this->lng->txt('back'),
317 $this->ctrl->getLinkTarget($this, 'overview')
318 );
319 }
320 $GLOBALS['DIC']['ilTabs']->activateSubTab($a_active);
321 }

References $GLOBALS, getLang(), SECTION_GROUP, and SECTION_MAIN.

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

+ 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 152 of file class.ilObjSystemCheckGUI.php.

153 {
154 $this->setSubTabs(self::SECTION_GROUP, '');
155
156 $grp_id = (int) $_REQUEST['grp_id'];
157 $this->ctrl->saveParameter($this, 'grp_id');
158
159 include_once 'Services/SystemCheck/classes/class.ilSCTaskTableGUI.php';
160 $table = new ilSCTaskTableGUI($grp_id, $this, 'showGroup');
161 $table->init();
162 $table->parse();
163
164 $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
165 return true;
166 }
Table GUI for system check task overview.

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

+ Here is the call graph for this function:

◆ trash()

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

Show trash form.

Parameters
ilPropertyFormGUI$form

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

176 {
177 $this->setSubTabs(self::SECTION_MAIN, 'trash');
178 if (!$form instanceof ilPropertyFormGUI) {
179 $form = $this->initFormTrash();
180 }
181 $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
182 }

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

Referenced by handleTrashAction().

+ 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.

Referenced by setSubTabs().

◆ SECTION_MAIN

const ilObjSystemCheckGUI::SECTION_MAIN = 'main'

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

Referenced by setSubTabs().


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