ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 

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
 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
 
 $rbacsystem
 
 $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 $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['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['ilTabs']->clearTargets();
98 $GLOBALS['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['loaded']
Global hash that tracks already loaded includes.
$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 255 of file class.ilObjSystemCheckGUI.php.

256 {
257 $form = $this->initFormTrash();
258 if ($form->checkInput()) {
259 $trash = new ilSystemCheckTrash();
261 $dt = $form->getItemByPostVar('age')->getDate();
262 if ($dt) {
263 $trash->setAgeLimit($dt);
264 }
265 $trash->setNumberLimit($form->getInput('number'));
266
267 if ($form->getInput('types')) {
268 $trash->setTypesLimit((array) $form->getInput('types'));
269 }
270 $trash->setMode($form->getInput('type'));
271 $trash->start();
272
273 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
274 $form->setValuesByPost();
275 $this->trash($form);
276 return true;
277 }
278
279 ilUtil::sendFailure($this->lng->txt('err_check_input'));
280 $form->setValuesByPost();
281 $this->trash($form);
282 return false;
283 }
trash(ilPropertyFormGUI $form=null)
Show trash form.
initFormTrash()
Show trash restore form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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(), ilUtil\sendSuccess(), and trash().

+ Here is the call graph for this function:

◆ initFormTrash()

ilObjSystemCheckGUI::initFormTrash ( )
protected

Show trash restore form.

Returns
ilPropertyFormGUI

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

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

130 {
131 $this->getLang()->loadLanguageModule('sysc');
132
133
134 $this->setSubTabs(self::SECTION_MAIN, 'overview');
135
136
137 include_once 'Services/SystemCheck/classes/class.ilSCGroupTableGUI.php';
138
139 $table = new ilSCGroupTableGUI($this, 'overview');
140 $table->init();
141 $table->parse();
142
143 $GLOBALS['tpl']->setContent($table->getHTML());
144 return true;
145 }
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 290 of file class.ilObjSystemCheckGUI.php.

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

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

151 {
152 $this->setSubTabs(self::SECTION_GROUP, '');
153
154 $grp_id = (int) $_REQUEST['grp_id'];
155 $this->ctrl->saveParameter($this, 'grp_id');
156
157 include_once 'Services/SystemCheck/classes/class.ilSCTaskTableGUI.php';
158 $table = new ilSCTaskTableGUI($grp_id, $this, 'showGroup');
159 $table->init();
160 $table->parse();
161
162 $GLOBALS['tpl']->setContent($table->getHTML());
163 return true;
164 }
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 173 of file class.ilObjSystemCheckGUI.php.

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

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: