ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerReferenceGUI Class Reference
+ Inheritance diagram for ilContainerReferenceGUI:
+ Collaboration diagram for ilContainerReferenceGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 redirectObject ()
 redirect to target More...
 
 createObject ()
 Create object. More...
 
 saveObject ()
 save object More...
 
 editReferenceObject ()
 
 editObject (ilPropertyFormGUI $form=null)
 edit title More...
 
 updateObject ()
 update title More...
 
 getTargetType ()
 get target type More...
 
 getReferenceType ()
 get reference type More...
 
 getTabs ()
 get tabs More...
 
 getId ()
 
- 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...
 
 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Data Fields

const MAX_SELECTION_ENTRIES = 50
 
const MODE_CREATE = 1
 
const MODE_EDIT = 2
 
- 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

 addLocatorItems ()
 Add locator item. More...
 
 initCreateForm ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 firstEditObject ()
 show edit screen without info message More...
 
 initForm ($a_mode=self::MODE_EDIT)
 Init title form. More...
 
 loadPropertiesFromSettingsForm (\ilPropertyFormGUI $form)
 
- 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...
 
 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...
 
 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...
 

Protected Attributes

 $tabs
 
 $locator
 
 $user
 
 $access
 
 $error
 
 $settings
 
 $existing_objects = array()
 
 $target_type
 
 $reference_type
 
 $form
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

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

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters

Definition at line 93 of file class.ilContainerReferenceGUI.php.

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), settings(), and user().

94  {
95  global $DIC;
96 
97  $this->lng = $DIC->language();
98  $this->ctrl = $DIC->ctrl();
99  $this->tabs = $DIC->tabs();
100  $this->locator = $DIC["ilLocator"];
101  $this->user = $DIC->user();
102  $this->access = $DIC->access();
103  $this->error = $DIC["ilErr"];
104  $this->settings = $DIC->settings();
105  $lng = $DIC->language();
106  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
107 
108  $lng->loadLanguageModule('objref');
109  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ addLocatorItems()

ilContainerReferenceGUI::addLocatorItems ( )
protected

Add locator item.

Definition at line 159 of file class.ilContainerReferenceGUI.php.

References $locator.

160  {
161  $ilLocator = $this->locator;
162 
163  if ($this->object instanceof ilObject) {
164  $ilLocator->addItem($this->object->getPresentationTitle(), $this->ctrl->getLinkTarget($this));
165  }
166  }

◆ afterSave()

ilContainerReferenceGUI::afterSave ( ilObject  $a_new_object)
protected
Parameters
ilObject$a_new_object

Definition at line 234 of file class.ilContainerReferenceGUI.php.

References ilObject\_lookupObjId(), ilObject\getRefId(), ilObject\setTitle(), ilContainerReference\TITLE_TYPE_CUSTOM, and ilObject\update().

235  {
236  $target_obj_id = ilObject::_lookupObjId((int) $this->form->getInput('target_id'));
237  $a_new_object->setTargetId($target_obj_id);
238 
239  $a_new_object->setTitleType($this->form->getInput('title_type'));
240  if ($this->form->getInput('title_type') == ilContainerReference::TITLE_TYPE_CUSTOM) {
241  $a_new_object->setTitle($this->form->getInput('title'));
242  }
243 
244  $a_new_object->update();
245 
246  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
247  $this->ctrl->setParameter($this, 'ref_id', $a_new_object->getRefId());
248  $this->ctrl->setParameter($this, 'creation_mode', 0);
249  $this->ctrl->redirect($this, 'firstEdit');
250  }
setTitle($a_title)
set object title
static _lookupObjId($a_id)
getRefId()
get reference id public
update()
update object in db
+ Here is the call graph for this function:

◆ createObject()

ilContainerReferenceGUI::createObject ( )

Create object.

Returns
void

Definition at line 185 of file class.ilContainerReferenceGUI.php.

References $_GET, $access, $error, $form, ilObjectGUI\$ilErr, $ilSetting, $ilUser, $settings, $user, and initForm().

Referenced by ilObjStudyProgrammeReferenceGUI\saveObject(), and saveObject().

186  {
188  $ilAccess = $this->access;
191 
192  $new_type = $_REQUEST["new_type"];
193  if (!$ilAccess->checkAccess("create_" . $this->getReferenceType(), '', $_GET["ref_id"], $new_type)) {
194  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
195  }
196  $form = $this->initForm(self::MODE_CREATE);
197  $this->tpl->setContent($form->getHTML());
198  }
initForm($a_mode=self::MODE_EDIT)
Init title form.
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editObject()

ilContainerReferenceGUI::editObject ( ilPropertyFormGUI  $form = null)

edit title

Parameters
ilPropertyFormGUI$form

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

References $DIC, $form, $tabs, and initForm().

271  {
272  global $DIC;
273 
274  $main_tpl = $DIC->ui()->mainTemplate();
275 
276  $ilTabs = $this->tabs;
277 
278  $ilTabs->setTabActive('settings');
279 
280  if (!$form instanceof ilPropertyFormGUI) {
281  $form = $this->initForm();
282  }
283  $main_tpl->setContent($form->getHTML());
284  }
This class represents a property form user interface.
initForm($a_mode=self::MODE_EDIT)
Init title form.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ editReferenceObject()

ilContainerReferenceGUI::editReferenceObject ( )

Definition at line 260 of file class.ilContainerReferenceGUI.php.

References ilObjectGUI\editObject().

261  {
262  $this->editObject();
263  }
editObject()
edit object
+ Here is the call graph for this function:

◆ executeCommand()

ilContainerReferenceGUI::executeCommand ( )

Execute command.

public

Returns
bool|mixed
Exceptions
ilCtrlException

Definition at line 119 of file class.ilContainerReferenceGUI.php.

References $_GET, ilObjectGUI\$ctrl, $form, $ilCtrl, $tabs, initForm(), ilObjectGUI\prepareOutput(), and ilObjectGUI\setCreationMode().

120  {
122  $ilTabs = $this->tabs;
123 
124 
125  if (isset($_GET['creation_mode']) && $_GET['creation_mode'] == self::MODE_CREATE) {
126  $this->setCreationMode(true);
127  }
128 
129  $next_class = $ilCtrl->getNextClass($this);
130  $cmd = $ilCtrl->getCmd();
131 
132  $this->prepareOutput();
133 
134  switch ($next_class) {
135  case "ilpropertyformgui":
136  $form = $this->initForm($this->creation_mode ? self::MODE_CREATE : self::MODE_EDIT);
137  $this->ctrl->forwardCommand($form);
138  break;
139 
140  case 'ilpermissiongui':
141  $ilTabs->setTabActive('perm_settings');
142  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
143  $ilCtrl->forwardCommand(new ilPermissionGUI($this));
144  break;
145 
146  default:
147  if (!$cmd || $cmd == 'view') {
148  $cmd = "edit";
149  }
150  $cmd .= "Object";
151  $this->$cmd();
152  break;
153  }
154  return true;
155  }
initForm($a_mode=self::MODE_EDIT)
Init title form.
$_GET["client_id"]
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! ...
global $ilCtrl
Definition: ilias.php:18
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ firstEditObject()

ilContainerReferenceGUI::firstEditObject ( )
protected

show edit screen without info message

Definition at line 255 of file class.ilContainerReferenceGUI.php.

References ilObjectGUI\editObject().

256  {
257  $this->editObject();
258  }
editObject()
edit object
+ Here is the call graph for this function:

◆ getId()

ilContainerReferenceGUI::getId ( )
Returns
int

Definition at line 487 of file class.ilContainerReferenceGUI.php.

References ilObjectGUI\$obj_id.

488  {
489  return $this->obj_id;
490  }

◆ getReferenceType()

ilContainerReferenceGUI::getReferenceType ( )

get reference type

public

Returns
string

Definition at line 448 of file class.ilContainerReferenceGUI.php.

References $reference_type.

Referenced by ilObjCourseReferenceGUI\getTabs(), and getTabs().

+ Here is the caller graph for this function:

◆ getTabs()

ilContainerReferenceGUI::getTabs ( )

get tabs

public

Parameters
objecttabs gui object

Definition at line 459 of file class.ilContainerReferenceGUI.php.

References $DIC, and getReferenceType().

460  {
461  global $DIC;
462 
463  $ilHelp = $DIC['ilHelp'];
464  $ilHelp->setScreenIdComponent($this->getReferenceType());
465 
466  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
467  $this->tabs_gui->addTarget(
468  "settings",
469  $this->ctrl->getLinkTarget($this, "edit"),
470  array(),
471  ""
472  );
473  }
474  if ($this->access->checkAccess('edit_permission', '', $this->object->getRefId())) {
475  $this->tabs_gui->addTarget(
476  "perm_settings",
477  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
478  array("perm","info","owner"),
479  'ilpermissiongui'
480  );
481  }
482  }
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getTargetType()

ilContainerReferenceGUI::getTargetType ( )

get target type

public

Returns
string

Definition at line 437 of file class.ilContainerReferenceGUI.php.

References $target_type.

Referenced by initForm().

+ Here is the caller graph for this function:

◆ initCreateForm()

ilContainerReferenceGUI::initCreateForm (   $a_new_type)
protected

Definition at line 226 of file class.ilContainerReferenceGUI.php.

References initForm().

227  {
228  return $this->initForm(self::MODE_CREATE);
229  }
initForm($a_mode=self::MODE_EDIT)
Init title form.
+ Here is the call graph for this function:

◆ initForm()

ilContainerReferenceGUI::initForm (   $a_mode = self::MODE_EDIT)
protected

Init title form.

Parameters
int$a_mode
Returns
ilPropertyFormGUI

Definition at line 291 of file class.ilContainerReferenceGUI.php.

References $form, getTargetType(), ilFormPropertyGUI\setRequired(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilObject\TITLE_LENGTH, ilContainerReference\TITLE_TYPE_CUSTOM, and ilContainerReference\TITLE_TYPE_REUSE.

Referenced by createObject(), editObject(), executeCommand(), initCreateForm(), and updateObject().

292  {
293  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
294  include_once './Services/ContainerReference/classes/class.ilContainerReference.php';
295  $form = new ilPropertyFormGUI();
296 
297  if ($a_mode == self::MODE_CREATE) {
298  $form->setTitle($this->lng->txt($this->getReferenceType() . '_new'));
299 
300  $this->ctrl->setParameter($this, 'creation_mode', $a_mode);
301  $this->ctrl->setParameter($this, 'new_type', $_REQUEST['new_type']);
302  } else {
303  $form->setTitle($this->lng->txt('edit'));
304  }
305 
306  $form->setFormAction($this->ctrl->getFormAction($this));
307  if ($a_mode == self::MODE_CREATE) {
308  $form->addCommandButton('save', $this->lng->txt('create'));
309  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
310  } else {
311  $form->addCommandButton('update', $this->lng->txt('save'));
312  }
313 
314  // title type
315  $ttype = new ilRadioGroupInputGUI($this->lng->txt('title'), 'title_type');
316  if ($a_mode == self::MODE_EDIT) {
317  $ttype->setValue($this->object->getTitleType());
318  } else {
319  $ttype->setValue(ilContainerReference::TITLE_TYPE_REUSE);
320  }
321 
322  $reuse = new ilRadioOption($this->lng->txt('objref_reuse_title'));
324  $ttype->addOption($reuse);
325 
326  $custom = new ilRadioOption($this->lng->txt('objref_custom_title'));
328 
329  // title
330  $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
331  $title->setSize(min(40, ilObject::TITLE_LENGTH));
332  $title->setMaxLength(ilObject::TITLE_LENGTH);
333  $title->setRequired(true);
334 
335  if ($a_mode == self::MODE_EDIT) {
336  $title->setValue($this->object->getTitle());
337  }
338 
339  $custom->addSubItem($title);
340  $ttype->addOption($custom);
341  $form->addItem($ttype);
342 
343  include_once("./Services/Form/classes/class.ilRepositorySelector2InputGUI.php");
344  $repo = new ilRepositorySelector2InputGUI($this->lng->txt("objref_edit_ref"), "target_id");
345  //$repo->setParent($this);
346  $repo->setRequired(true);
347  $repo->getExplorerGUI()->setSelectableTypes(array($this->getTargetType()));
348  $repo->getExplorerGUI()->setTypeWhiteList(
349  array_merge(
350  array($this->getTargetType()),
351  array("root", "cat", "grp", "fold", "crs")
352  )
353  );
354  $repo->setInfo($this->lng->txt($this->getReferenceType() . '_edit_info'));
355 
356  if ($a_mode == self::MODE_EDIT) {
357  $repo->getExplorerGUI()->setPathOpen($this->object->getTargetRefId());
358  $repo->setValue($this->object->getTargetRefId());
359  }
360 
361  $form->addItem($repo);
362  $this->form = $form;
363  return $form;
364  }
This class represents an option in a radio group.
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
This class represents a property in a property form.
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadPropertiesFromSettingsForm()

ilContainerReferenceGUI::loadPropertiesFromSettingsForm ( \ilPropertyFormGUI  $form)
protected
Parameters
\ilPropertyFormGUI$form
Returns
bool

Definition at line 371 of file class.ilContainerReferenceGUI.php.

References $access, $DIC, $ok, ilObject\_lookupObjId(), ilObject\_lookupType(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), and ilContainerReference\TITLE_TYPE_CUSTOM.

Referenced by updateObject().

371  : bool
372  {
373  global $DIC;
374 
375  $ok = true;
376  $access = $DIC->access();
377 
378  $this->object->setTitleType($form->getInput('title_type'));
379  if ($form->getInput('title_type') == ilContainerReference::TITLE_TYPE_CUSTOM) {
380  $this->object->setTitle($form->getInput('title'));
381  }
382 
383  // check access
384  if (
385  !$access->checkAccess('visible', '', (int) $form->getInput('target_id'))
386  ) {
387  $ok = false;
388  $form->getItemByPostVar('target_id')->setAlert($this->lng->txt('permission_denied'));
389  }
390  // check target type
391  if (ilObject::_lookupType($form->getInput('target_id'), true) != $this->target_type) {
392  $ok = false;
393  $form->getItemByPostVar('target_id')->setAlert(
394  $this->lng->txt('objref_failure_target_type') .
395  ': ' .
396  $this->lng->txt('obj_' . $this->target_type)
397  );
398  }
399 
400  $this->object->setTargetId(
401  \ilObject::_lookupObjId((int) $form->getInput('target_id'))
402  );
403 
404  return $ok;
405  }
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectObject()

ilContainerReferenceGUI::redirectObject ( )

redirect to target

Parameters

Definition at line 172 of file class.ilContainerReferenceGUI.php.

References ilObjectGUI\$ctrl, and $ilCtrl.

173  {
175 
176  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->object->getTargetRefId());
177  $ilCtrl->redirectByClass("ilrepositorygui", "");
178  }
global $ilCtrl
Definition: ilias.php:18

◆ saveObject()

ilContainerReferenceGUI::saveObject ( )

save object

public

Parameters

Definition at line 208 of file class.ilContainerReferenceGUI.php.

References $access, createObject(), and ilUtil\sendFailure().

209  {
210  $ilAccess = $this->access;
211 
212  if (!(int) $_REQUEST['target_id']) {
213  ilUtil::sendFailure($this->lng->txt('select_one'));
214  $this->createObject();
215  return false;
216  }
217  if (!$ilAccess->checkAccess('visible', '', (int) $_REQUEST['target_id'])) {
218  ilUtil::sendFailure($this->lng->txt('permission_denied'));
219  $this->createObject();
220  return false;
221  }
222 
223  parent::saveObject();
224  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ updateObject()

ilContainerReferenceGUI::updateObject ( )

update title

Definition at line 411 of file class.ilContainerReferenceGUI.php.

References $access, $form, ilObjectGUI\checkPermission(), ilObjectGUI\editObject(), initForm(), loadPropertiesFromSettingsForm(), and ilUtil\sendFailure().

412  {
413  $this->checkPermission('write');
414 
415  $ilAccess = $this->access;
416  $form = $this->initForm();
417  if (
418  $form->checkInput() &&
420  ) {
421  $this->object->update();
422  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
423  $this->ctrl->redirect($this, 'edit');
424  }
425  $form->setValuesByPost();
426  ilUtil::sendFailure($this->lng->txt('err_check_input'));
427  $this->editObject($form);
428  return true;
429  }
initForm($a_mode=self::MODE_EDIT)
Init title form.
editObject()
edit object
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
loadPropertiesFromSettingsForm(\ilPropertyFormGUI $form)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

Field Documentation

◆ $access

◆ $error

ilContainerReferenceGUI::$error
protected

Definition at line 65 of file class.ilContainerReferenceGUI.php.

Referenced by createObject().

◆ $existing_objects

ilContainerReferenceGUI::$existing_objects = array()
protected

Definition at line 73 of file class.ilContainerReferenceGUI.php.

◆ $form

ilContainerReferenceGUI::$form
protected

◆ $locator

ilContainerReferenceGUI::$locator
protected

Definition at line 50 of file class.ilContainerReferenceGUI.php.

Referenced by addLocatorItems().

◆ $reference_type

ilContainerReferenceGUI::$reference_type
protected

Definition at line 82 of file class.ilContainerReferenceGUI.php.

Referenced by getReferenceType().

◆ $settings

ilContainerReferenceGUI::$settings
protected

Definition at line 70 of file class.ilContainerReferenceGUI.php.

Referenced by createObject().

◆ $tabs

ilContainerReferenceGUI::$tabs
protected

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

Referenced by editObject(), and executeCommand().

◆ $target_type

ilContainerReferenceGUI::$target_type
protected

Definition at line 78 of file class.ilContainerReferenceGUI.php.

Referenced by getTargetType().

◆ $user

ilContainerReferenceGUI::$user
protected

◆ MAX_SELECTION_ENTRIES

const ilContainerReferenceGUI::MAX_SELECTION_ENTRIES = 50

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

◆ MODE_CREATE

const ilContainerReferenceGUI::MODE_CREATE = 1

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

◆ MODE_EDIT

const ilContainerReferenceGUI::MODE_EDIT = 2

Definition at line 40 of file class.ilContainerReferenceGUI.php.


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