ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilPCResourcesGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCResourcesGUI:
+ Collaboration diagram for ilPCResourcesGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
 
 executeCommand ()
 
 insert ()
 
 edit (bool $a_insert=false)
 
 initForm (bool $a_insert=false)
 
 initCreationForm ()
 
 initEditingForm ()
 
 create ()
 
 update ()
 
- Public Member Functions inherited from ilPageContentGUI
 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Static Public Member Functions

static insertResourcesIntoPageContent (string $a_content)
 Insert resources (see also ilContainerContentGUI::determinePageEmbeddedBlocks for presentation) More...
 
- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 

Protected Member Functions

 getContainerViewManager ()
 
 supportsItemGroups ()
 
 supportsOther ()
 
 supportsObjectives ()
 
 supportsTypeBlocks ()
 
 hasOtherBlock ()
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
 setEditorToolContext ()
 
 initEditor ()
 
 getEditorScriptTag (string $form_pc_id="", string $form_cname="")
 

Protected Attributes

ILIAS Container InternalDomainService $container_domain
 
ilTree $rep_tree
 
ilObjectDefinition $obj_definition
 
- Protected Attributes inherited from ilPageContentGUI
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS COPage InternalGUIService $gui
 
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
LOMServices $lom_services
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
Style Content CharacteristicManager $char_manager
 

Additional Inherited Members

- Data Fields inherited from ilPageContentGUI
ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
DOMDocument $dom
 
 $updated
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Static Protected Attributes inherited from ilPageContentGUI
static array $common_bb_buttons
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning User Interface for Resources Component Editing

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.ilPCResourcesGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCResourcesGUI::__construct ( ilPageObject  $a_pg_obj,
?ilPageContent  $a_content_obj,
string  $a_hier_id,
string  $a_pc_id = "" 
)

Definition at line 30 of file class.ilPCResourcesGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

35  {
36  global $DIC;
37 
38  $this->ctrl = $DIC->ctrl();
39  $this->tpl = $DIC["tpl"];
40  $this->lng = $DIC->language();
41  $this->obj_definition = $DIC["objDefinition"];
42  $tree = $DIC->repositoryTree();
43 
44  $this->rep_tree = $tree;
45 
46  $this->container_domain = $DIC->container()->internal()->domain();
47 
48  parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
49  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCResourcesGUI::create ( )

Definition at line 277 of file class.ilPCResourcesGUI.php.

References ILIAS\Repository\ctrl(), ilPageContentGUI\getPage(), and insert().

277  : void
278  {
279  $this->content_obj = new ilPCResources($this->getPage());
280  $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
281 
282  if ($this->request->getString("res_type") === "_other") {
283  $this->content_obj->setResourceListType("_other");
284  } elseif ($this->request->getString("res_type") === "_lobj") {
285  $this->content_obj->setResourceListType("_lobj");
286  } elseif ($this->request->getString("res_type") !== "itgr") {
287  $this->content_obj->setResourceListType(
288  $this->request->getString("type")
289  );
290  } else {
291  $this->content_obj->setItemGroupRefId(
292  $this->request->getString("itgr")
293  );
294  }
295  $this->updated = $this->pg_obj->update();
296  if ($this->updated === true) {
297  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
298  } else {
299  $this->insert();
300  }
301  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ edit()

ilPCResourcesGUI::edit ( bool  $a_insert = false)

Definition at line 71 of file class.ilPCResourcesGUI.php.

References ilPageContentGUI\$tpl, ilPageContentGUI\displayValidationError(), initForm(), and ILIAS\UICore\GlobalTemplate\setContent().

Referenced by insert(), and update().

71  : void
72  {
73  $tpl = $this->tpl;
74  $this->displayValidationError();
75  $form = $this->initForm($a_insert);
76  $html = $form->getHTML();
77  $tpl->setContent($html);
78  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
initForm(bool $a_insert=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilPCResourcesGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl().

51  : void
52  {
53  // get next class that processes or forwards current command
54  $next_class = $this->ctrl->getNextClass($this);
55 
56  // get current command
57  $cmd = $this->ctrl->getCmd();
58 
59  switch ($next_class) {
60  default:
61  $this->$cmd();
62  break;
63  }
64  }
+ Here is the call graph for this function:

◆ getContainerViewManager()

ilPCResourcesGUI::getContainerViewManager ( )
protected
Exceptions
ilDatabaseException
ilObjectNotFoundException

Definition at line 229 of file class.ilPCResourcesGUI.php.

References $container, $ref_id, ilPageContentGUI\$requested_ref_id, and ilObjectFactory\getInstanceByRefId().

Referenced by supportsItemGroups(), supportsObjectives(), supportsOther(), and supportsTypeBlocks().

229  : \ILIAS\Container\Content\ViewManager
230  {
233  $view_manager = $this->container_domain->content()->view($container);
234  return $view_manager;
235  }
$container
Definition: wac.php:36
$ref_id
Definition: ltiauth.php:65
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasOtherBlock()

ilPCResourcesGUI::hasOtherBlock ( )
protected

Definition at line 327 of file class.ilPCResourcesGUI.php.

References $DIC, $ref_id, ilObjectFactory\getInstanceByRefId(), and null.

Referenced by initForm().

327  : bool
328  {
329  global $DIC;
330 
331  $ref_id = $DIC
332  ->copage()
333  ->internal()
334  ->gui()
335  ->pc()
336  ->editRequest()
337  ->getRefId();
338  $item_presentation_manager = $DIC->container()->internal()
339  ->domain()
340  ->content()
341  ->itemPresentation(
343  null,
344  false
345  );
346  $block_sequence = $item_presentation_manager->getItemBlockSequence();
347  foreach ($block_sequence->getBlocks() as $block) {
348  if (($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock)) {
349  return true;
350  }
351  }
352  return false;
353  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForm()

ilPCResourcesGUI::initCreationForm ( )

Definition at line 213 of file class.ilPCResourcesGUI.php.

References initForm().

Referenced by ilPCResourcesEditorGUI\getEditorElements().

214  {
215  $form = $this->initForm(true);
216  return $form;
217  }
initForm(bool $a_insert=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditingForm()

ilPCResourcesGUI::initEditingForm ( )

Definition at line 219 of file class.ilPCResourcesGUI.php.

References initForm().

Referenced by ilPCResourcesEditorGUI\getEditorElements().

220  {
221  $form = $this->initForm(false);
222  return $form;
223  }
initForm(bool $a_insert=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

ilPCResourcesGUI::initForm ( bool  $a_insert = false)

Definition at line 80 of file class.ilPCResourcesGUI.php.

References $c, ilPageContentGUI\$ctrl, ilPageContentGUI\$lng, $obj_definition, $ref_id, ilPageContentGUI\$requested_ref_id, ilPageContentGUI\$tpl, ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectPlugin\getPluginObjectByType(), hasOtherBlock(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), null, ilSelectInputGUI\setOptions(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), supportsItemGroups(), supportsObjectives(), supportsOther(), and ilLanguage\txt().

Referenced by edit(), initCreationForm(), and initEditingForm().

81  {
82  $ilCtrl = $this->ctrl;
83  $tpl = $this->tpl;
84  $lng = $this->lng;
85  $objDefinition = $this->obj_definition;
86 
87  $op_type = null;
88  $op_itemgroup = null;
89 
90  // edit form
91  $form = new ilPropertyFormGUI();
92  $form->setFormAction($ilCtrl->getFormAction($this));
93  if ($a_insert) {
94  $form->setTitle($this->lng->txt("cont_insert_resources"));
95  } else {
96  $form->setTitle($this->lng->txt("cont_update_resources"));
97  }
98 
99  // count number of existing objects per type and collect item groups
101  $childs = $this->rep_tree->getChilds($ref_id);
102 
103  $type_counts = array();
104  $item_groups = array();
105  foreach ($childs as $c) {
106  // see bug #12471
107  //echo "<br>-".$c["type"]."-".$objDefinition->getGroupOfObj($c["type"])."-";
108  $key = ($objDefinition->getGroupOfObj($c["type"]) != "")
109  ? $objDefinition->getGroupOfObj($c["type"])
110  : $c["type"];
111  $type_counts[$key] = ($type_counts[$key] ?? 0) + 1;
112  if ($c["type"] == "itgr") {
113  $item_groups[$c["ref_id"]] = $c["title"];
114  }
115  }
116 
117  // radio group for type selection
118  $radg = new ilRadioGroupInputGUI($lng->txt("cont_resources"), "res_type");
119  $form->addItem($radg);
120  if (!$a_insert && $this->content_obj->getMainType() == "ItemGroup") {
121  $radg->setValue("itgr");
122  } else {
123  $radg->setValue("by_type");
124  }
125 
126 
127  $op_type = new ilRadioOption($lng->txt("cont_resources_of_type"), "by_type", "");
128  // all views support typed blocks
129  //if ($this->supportsTypeBlocks()) {
130  //}
131 
132  if ($this->supportsItemGroups() && count($item_groups) > 0) {
133  $op_itemgroup = new ilRadioOption($lng->txt("cont_manual_item_group"), "itgr", "");
134  $radg->addOption($op_itemgroup);
135  }
136 
137  $radg->addOption($op_type);
138 
139  // type selection
140  $type_prop = new ilSelectInputGUI(
141  $this->lng->txt("cont_type"),
142  "type"
143  );
144  $obj_id = ilObject::_lookupObjId($this->requested_ref_id);
145  $obj_type = ilObject::_lookupType($obj_id);
146  $sub_objs = $objDefinition->getGroupedRepositoryObjectTypes($obj_type);
147  $types = array();
148  foreach ($sub_objs as $k => $so) {
149  $cnt = (int) ($type_counts[$k] ?? 0);
150  if ($cnt === 0) {
151  continue;
152  }
153  if (!$objDefinition->isPlugin($k)) {
154  if ($k != "itgr") {
155  $types[$k] = $this->lng->txt("objs_" . $k) . " (" . $cnt . ")";
156  }
157  } else {
159  $types[$k] = $pl->txt("objs_" . $k) . " (" . $cnt . ")";
160  }
161  }
162  $type_prop->setOptions($types);
163  $selected = ($a_insert)
164  ? ""
165  : $this->content_obj->getResourceListType();
166  $type_prop->setValue($selected);
167  $op_type->addSubItem($type_prop);
168 
169  if ($this->supportsItemGroups() && count($item_groups) > 0) {
170  // item groups
171  $options = $item_groups;
172  $si = new ilSelectInputGUI($this->lng->txt("obj_itgr"), "itgr");
173  $si->setOptions($options);
174  $selected = ($a_insert)
175  ? ""
176  : $this->content_obj->getItemGroupRefId();
177  $op_itemgroup->addSubItem($si);
178  if ($a_insert) {
179  $radg->setValue("itgr");
180  }
181  }
182 
183  // learning objectives
184  if ($this->supportsObjectives()) {
185  $lng->loadLanguageModule("crs");
186  $op_lobj = new ilRadioOption($lng->txt("crs_objectives"), "_lobj", "");
187  $radg->addOption($op_lobj);
188  if (!$a_insert && $this->content_obj->getResourceListType() === "_lobj") {
189  $radg->setValue("_lobj");
190  }
191  }
192 
193  // other
194  if ($this->supportsOther() && $this->hasOtherBlock()) {
195  $op_other = new ilRadioOption($lng->txt("cont_other_resources"), "_other", "");
196  $radg->addOption($op_other);
197  if (!$a_insert && $this->content_obj->getResourceListType() === "_other") {
198  $radg->setValue("_other");
199  }
200  }
201 
202  // save/cancel buttons
203  if ($a_insert) {
204  $form->addCommandButton("create", $lng->txt("save"));
205  $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
206  } else {
207  $form->addCommandButton("update_resources", $lng->txt("save"));
208  $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
209  }
210  return $form;
211  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
loadLanguageModule(string $a_module)
Load language module.
setOptions(array $a_options)
$c
Definition: deliver.php:25
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65
This class represents a property in a property form.
setValue(string $a_value)
ilGlobalTemplateInterface $tpl
static getPluginObjectByType(string $type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin...
ilObjectDefinition $obj_definition
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

ilPCResourcesGUI::insert ( )

Definition at line 66 of file class.ilPCResourcesGUI.php.

References edit().

Referenced by create().

66  : void
67  {
68  $this->edit(true);
69  }
edit(bool $a_insert=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertResourcesIntoPageContent()

static ilPCResourcesGUI::insertResourcesIntoPageContent ( string  $a_content)
static

Insert resources (see also ilContainerContentGUI::determinePageEmbeddedBlocks for presentation)

Definition at line 358 of file class.ilPCResourcesGUI.php.

References $data, $DIC, $id, ilPageContentGUI\$lng, $ref_id, ilPageContentGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\UICore\GlobalTemplate\get(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByRefId(), ilUtil\img(), ilCourseObjective\lookupObjectiveTitle(), null, ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ilLanguage\txt().

Referenced by ilPageObjectGUI\insertResources().

360  : string {
361  global $DIC;
362 
363  $item_ref_ids = [];
364 
365  $lng = $DIC->language();
366  $ref_id = $DIC
367  ->copage()
368  ->internal()
369  ->gui()
370  ->pc()
371  ->editRequest()
372  ->getRefId();
373  $item_presentation_manager = $DIC->container()->internal()
374  ->domain()
375  ->content()
376  ->itemPresentation(
378  null
379  );
380  $block_sequence = $item_presentation_manager->getItemBlockSequence();
381 
382  foreach ($block_sequence->getBlocks() as $block) {
383  // render block
384  $tpl = new ilTemplate("tpl.resource_block.html", true, true, "components/ILIAS/COPage");
385  $cnt = 0;
386  $max = 5;
387  if (!($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) &&
388  count($block->getItemRefIds()) > 0) {
389  foreach ($block->getItemRefIds() as $ref_id) {
390  $data = $item_presentation_manager->getRawDataByRefId($ref_id);
391  if ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
392  if ($data["type"] === "itgr" || in_array($ref_id, $item_ref_ids)) {
393  continue;
394  }
395  }
396 
397  if ($cnt < $max) {
398  $tpl->setCurrentBlock("row");
399  $tpl->setVariable(
400  "IMG",
401  ilUtil::img(
402  ilObject::_getIcon((int) $data["obj_id"], "small"),
403  null,
404  "",
405  "",
406  0,
407  "",
408  "ilListItemIcon"
409  )
410  );
411 
412  $tpl->setVariable("TITLE", $data["title"]);
414  }
415  if ($cnt == $max) {
416  $tpl->setCurrentBlock("row");
417  $tpl->setVariable("IMG", ilUtil::img(
418  ilObject::_getIcon((int) $data["obj_id"], "small"),
419  null,
420  "",
421  "",
422  0,
423  "",
424  "ilListItemIcon"
425  ));
426  $tpl->setVariable("TITLE", "...");
428  }
429  $cnt++;
430  $item_ref_ids[$ref_id] = $ref_id;
431  }
432  } elseif (count($block->getObjectiveIds()) > 0) {
433  foreach ($block->getObjectiveIds() as $objective_id) {
434  $title = \ilCourseObjective::lookupObjectiveTitle($objective_id);
435  if ($cnt < $max) {
436  $tpl->setCurrentBlock("row");
437  $tpl->setVariable("IMG", ilUtil::img(
438  ilUtil::getImagePath("icon_lobj.svg"),
439  null,
440  "",
441  "",
442  0,
443  "",
444  "ilListItemIcon"
445  ));
446  $tpl->setVariable("TITLE", $title);
448  }
449  if ($cnt == $max) {
450  $tpl->setCurrentBlock("row");
451  $tpl->setVariable("IMG", ilUtil::img(
452  ilUtil::getImagePath("icon_lobj.svg"),
453  null,
454  "",
455  "",
456  0,
457  "",
458  "ilListItemIcon"
459  ));
460  $tpl->setVariable("TITLE", "...");
462  }
463  $cnt++;
464  }
465  } else {
466  $tpl->setCurrentBlock("row");
467  $tpl->setVariable("TITLE", $lng->txt("no_items"));
469  }
470  if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock) {
471  $type = $block->getId();
472  $tpl->setVariable("HEADER", $lng->txt("objs_" . $type));
473  $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
474  } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
475  $type = $block->getId();
476  $tpl->setVariable("HEADER", $lng->txt("objs_sess"));
477  $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
478  } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
479  $id = $block->getId();
482  ));
483  $a_content = str_replace("[item-group-" . $id . "]", $tpl->get(), $a_content);
484  } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
485  $id = $block->getId();
486  $tpl->setVariable("HEADER", $lng->txt("crs_objectives"));
487  $a_content = str_replace("[list-_lobj]", $tpl->get(), $a_content);
488  } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
489  $id = $block->getId();
490  $tpl->setVariable("HEADER", $lng->txt("cont_content"));
491  $a_content = str_replace("[list-_other]", $tpl->get(), $a_content);
492  }
493  }
494  return $a_content;
495  }
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65
static _lookupTitle(int $obj_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
global $DIC
Definition: shib_login.php:22
ilGlobalTemplateInterface $tpl
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsItemGroups()

ilPCResourcesGUI::supportsItemGroups ( )
protected

Definition at line 237 of file class.ilPCResourcesGUI.php.

References getContainerViewManager().

Referenced by initForm().

237  : bool
238  {
239  foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
240  if ($part instanceof \ILIAS\Container\Content\ItemGroupBlocks) {
241  return true;
242  }
243  }
244  return false;
245  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsObjectives()

ilPCResourcesGUI::supportsObjectives ( )
protected

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

References getContainerViewManager().

Referenced by initForm().

257  : bool
258  {
259  foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
260  if ($part instanceof \ILIAS\Container\Content\ObjectivesBlock) {
261  return true;
262  }
263  }
264  return false;
265  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsOther()

ilPCResourcesGUI::supportsOther ( )
protected

Definition at line 247 of file class.ilPCResourcesGUI.php.

References getContainerViewManager().

Referenced by initForm().

247  : bool
248  {
249  foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
250  if ($part instanceof \ILIAS\Container\Content\OtherBlock) {
251  return true;
252  }
253  }
254  return false;
255  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsTypeBlocks()

ilPCResourcesGUI::supportsTypeBlocks ( )
protected

Definition at line 267 of file class.ilPCResourcesGUI.php.

References getContainerViewManager().

267  : bool
268  {
269  foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
270  if ($part instanceof \ILIAS\Container\Content\TypeBlocks) {
271  return true;
272  }
273  }
274  return false;
275  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ update()

ilPCResourcesGUI::update ( )

Definition at line 303 of file class.ilPCResourcesGUI.php.

References ILIAS\Repository\ctrl(), and edit().

303  : void
304  {
305  if ($this->request->getString("res_type") === "_other") {
306  $this->content_obj->setResourceListType("_other");
307  } elseif ($this->request->getString("res_type") === "_lobj") {
308  $this->content_obj->setResourceListType("_lobj");
309  } elseif ($this->request->getString("res_type") !== "itgr") {
310  $this->content_obj->setResourceListType(
311  $this->request->getString("type")
312  );
313  } else {
314  $this->content_obj->setItemGroupRefId(
315  $this->request->getString("itgr")
316  );
317  }
318  $this->updated = $this->pg_obj->update();
319  if ($this->updated === true) {
320  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
321  } else {
322  $this->pg_obj->addHierIDs();
323  $this->edit();
324  }
325  }
edit(bool $a_insert=false)
+ Here is the call graph for this function:

Field Documentation

◆ $container_domain

ILIAS Container InternalDomainService ilPCResourcesGUI::$container_domain
protected

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

◆ $obj_definition

ilObjectDefinition ilPCResourcesGUI::$obj_definition
protected

Definition at line 27 of file class.ilPCResourcesGUI.php.

Referenced by initForm().

◆ $rep_tree

ilTree ilPCResourcesGUI::$rep_tree
protected

Definition at line 26 of file class.ilPCResourcesGUI.php.


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