ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 = "" 
)

Reimplemented from ilPageContentGUI.

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

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 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPCResourcesGUI::create ( )

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

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

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

+ Here is the call graph for this function:

◆ edit()

ilPCResourcesGUI::edit ( bool  $a_insert = false)

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

71 : void
72 {
75 $form = $this->initForm($a_insert);
76 $html = $form->getHTML();
77 $tpl->setContent($html);
78 }
initForm(bool $a_insert=false)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

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

Referenced by insert(), and update().

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

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 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getContainerViewManager()

ilPCResourcesGUI::getContainerViewManager ( )
protected
Exceptions
ilDatabaseException
ilObjectNotFoundException

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

230 {
233 $view_manager = $this->container_domain->content()->view($container);
234 return $view_manager;
235 }
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
$ref_id
Definition: ltiauth.php:66
$container
@noRector
Definition: wac.php:37

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

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

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

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 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

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

Referenced by initForm().

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

214 {
215 $form = $this->initForm(true);
216 return $form;
217 }
This class represents a property form user interface.

References initForm().

+ Here is the call graph for this function:

◆ initEditingForm()

ilPCResourcesGUI::initEditingForm ( )

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

220 {
221 $form = $this->initForm(false);
222 return $form;
223 }

References initForm().

+ Here is the call graph for this function:

◆ initForm()

ilPCResourcesGUI::initForm ( bool  $a_insert = false)

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

81 {
82 $ilCtrl = $this->ctrl;
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 }
loadLanguageModule(string $a_module)
Load language module.
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...
static getPluginObjectByType(string $type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
ilObjectDefinition $obj_definition
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.
$c
Definition: deliver.php:25

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(), supportsItemGroups(), supportsObjectives(), supportsOther(), and ilLanguage\txt().

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

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

66 : void
67 {
68 $this->edit(true);
69 }
edit(bool $a_insert=false)

References edit().

Referenced by create().

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

360 : string {
361 global $DIC;
362
363 $obj_definition = $DIC["objDefinition"];
364 $item_ref_ids = [];
365
366 $lng = $DIC->language();
367 $ref_id = $DIC
368 ->copage()
369 ->internal()
370 ->gui()
371 ->pc()
372 ->editRequest()
373 ->getRefId();
374 $item_presentation_manager = $DIC->container()->internal()
375 ->domain()
376 ->content()
377 ->itemPresentation(
379 null
380 );
381 $block_sequence = $item_presentation_manager->getItemBlockSequence();
382
383 foreach ($block_sequence->getBlocks() as $block) {
384 // render block
385 $tpl = new ilTemplate("tpl.resource_block.html", true, true, "components/ILIAS/COPage");
386 $cnt = 0;
387 $max = 5;
388 if (!($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) &&
389 count($block->getItemRefIds()) > 0) {
390 foreach ($block->getItemRefIds() as $ref_id) {
391 $data = $item_presentation_manager->getRawDataByRefId($ref_id);
392 if ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
393 if ($data["type"] === "itgr" || in_array($ref_id, $item_ref_ids)) {
394 continue;
395 }
396 }
397
398 if ($cnt < $max) {
399 $tpl->setCurrentBlock("row");
401 "IMG",
403 ilObject::_getIcon((int) $data["obj_id"], "small"),
404 null,
405 "",
406 "",
407 0,
408 "",
409 "ilListItemIcon"
410 )
411 );
412
413 $tpl->setVariable("TITLE", $data["title"]);
415 }
416 if ($cnt == $max) {
417 $tpl->setCurrentBlock("row");
419 ilObject::_getIcon((int) $data["obj_id"], "small"),
420 null,
421 "",
422 "",
423 0,
424 "",
425 "ilListItemIcon"
426 ));
427 $tpl->setVariable("TITLE", "...");
429 }
430 $cnt++;
431 $item_ref_ids[$ref_id] = $ref_id;
432 }
433 } elseif (count($block->getObjectiveIds()) > 0) {
434 foreach ($block->getObjectiveIds() as $objective_id) {
435 $title = \ilCourseObjective::lookupObjectiveTitle($objective_id);
436 if ($cnt < $max) {
437 $tpl->setCurrentBlock("row");
439 ilUtil::getImagePath("icon_lobj.svg"),
440 null,
441 "",
442 "",
443 0,
444 "",
445 "ilListItemIcon"
446 ));
447 $tpl->setVariable("TITLE", $title);
449 }
450 if ($cnt == $max) {
451 $tpl->setCurrentBlock("row");
453 ilUtil::getImagePath("icon_lobj.svg"),
454 null,
455 "",
456 "",
457 0,
458 "",
459 "ilListItemIcon"
460 ));
461 $tpl->setVariable("TITLE", "...");
463 }
464 $cnt++;
465 }
466 } else {
467 $tpl->setCurrentBlock("row");
468 $tpl->setVariable("TITLE", $lng->txt("no_items"));
470 }
471 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock) {
472 $type = $block->getId();
473
474 if (!$obj_definition->isPlugin($type)) {
475 $title = $lng->txt("objs_" . $type);
476 } else {
478 $title = $pl->txt("objs_" . $type);
479 }
480
481 $tpl->setVariable("HEADER", $title);
482 $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
483 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
484 $type = $block->getId();
485 $tpl->setVariable("HEADER", $lng->txt("objs_sess"));
486 $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
487 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
488 $id = $block->getId();
491 ));
492 $a_content = str_replace("[item-group-" . $id . "]", $tpl->get(), $a_content);
493 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
494 $id = $block->getId();
495 $tpl->setVariable("HEADER", $lng->txt("crs_objectives"));
496 $a_content = str_replace("[list-_lobj]", $tpl->get(), $a_content);
497 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
498 $id = $block->getId();
499 $tpl->setVariable("HEADER", $lng->txt("cont_content"));
500 $a_content = str_replace("[list-_other]", $tpl->get(), $a_content);
501 }
502 }
503 return $a_content;
504 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
isPlugin(string $obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupTitle(int $obj_id)
special template class to simplify handling of ITX/PEAR
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 img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.

References $data, $id, ilPageContentGUI\$lng, $obj_definition, $ref_id, ilPageContentGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\UICore\GlobalTemplate\get(), ilUtil\getImagePath(), ilObjectPlugin\getPluginObjectByType(), ilUtil\img(), ilObjectDefinition\isPlugin(), ilCourseObjective\lookupObjectiveTitle(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ilLanguage\txt().

Referenced by ilPageObjectGUI\insertResources().

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

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 }

References getContainerViewManager().

Referenced by initForm().

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

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 }

References getContainerViewManager().

Referenced by initForm().

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

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 }

References getContainerViewManager().

Referenced by initForm().

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

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 }

References getContainerViewManager().

+ Here is the call graph for this function:

◆ update()

ilPCResourcesGUI::update ( )

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

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 }

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

+ 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(), and insertResourcesIntoPageContent().

◆ $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: