ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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
 
array bool null $updated = null
 
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 278 of file class.ilPCResourcesGUI.php.

278 : void
279 {
280 $this->content_obj = new ilPCResources($this->getPage());
281 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
282
283 if ($this->request->getString("res_type") === "_other") {
284 $this->content_obj->setResourceListType("_other");
285 } elseif ($this->request->getString("res_type") === "_lobj") {
286 $this->content_obj->setResourceListType("_lobj");
287 } elseif ($this->request->getString("res_type") !== "itgr") {
288 $this->content_obj->setResourceListType(
289 $this->request->getString("type")
290 );
291 } else {
292 $this->content_obj->setItemGroupRefId(
293 $this->request->getString("itgr")
294 );
295 }
296 $this->updated = $this->pg_obj->update();
297 if ($this->updated === true) {
298 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
299 } else {
300 $this->insert();
301 }
302 }
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 230 of file class.ilPCResourcesGUI.php.

231 {
234 $view_manager = $this->container_domain->content()->view($container);
235 return $view_manager;
236 }
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 328 of file class.ilPCResourcesGUI.php.

328 : bool
329 {
330 global $DIC;
331
332 $ref_id = $DIC
333 ->copage()
334 ->internal()
335 ->gui()
336 ->pc()
337 ->editRequest()
338 ->getRefId();
339 $item_presentation_manager = $DIC->container()->internal()
340 ->domain()
341 ->content()
342 ->itemPresentation(
344 null,
345 false
346 );
347 $block_sequence = $item_presentation_manager->getItemBlockSequence();
348 foreach ($block_sequence->getBlocks() as $block) {
349 if (($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock)) {
350 return true;
351 }
352 }
353 return false;
354 }
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 214 of file class.ilPCResourcesGUI.php.

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

References initForm().

+ Here is the call graph for this function:

◆ initEditingForm()

ilPCResourcesGUI::initEditingForm ( )

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

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

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 sort($options);
173 $si = new ilSelectInputGUI($this->lng->txt("obj_itgr"), "itgr");
174 $si->setOptions($options);
175 $selected = ($a_insert)
176 ? ""
177 : $this->content_obj->getItemGroupRefId();
178 $op_itemgroup->addSubItem($si);
179 if ($a_insert) {
180 $radg->setValue("itgr");
181 }
182 }
183
184 // learning objectives
185 if ($this->supportsObjectives()) {
186 $lng->loadLanguageModule("crs");
187 $op_lobj = new ilRadioOption($lng->txt("crs_objectives"), "_lobj", "");
188 $radg->addOption($op_lobj);
189 if (!$a_insert && $this->content_obj->getResourceListType() === "_lobj") {
190 $radg->setValue("_lobj");
191 }
192 }
193
194 // other
195 if ($this->supportsOther() && $this->hasOtherBlock()) {
196 $op_other = new ilRadioOption($lng->txt("cont_other_resources"), "_other", "");
197 $radg->addOption($op_other);
198 if (!$a_insert && $this->content_obj->getResourceListType() === "_other") {
199 $radg->setValue("_other");
200 }
201 }
202
203 // save/cancel buttons
204 if ($a_insert) {
205 $form->addCommandButton("create", $lng->txt("save"));
206 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
207 } else {
208 $form->addCommandButton("update_resources", $lng->txt("save"));
209 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
210 }
211 return $form;
212 }
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, ILIAS\UI\Implementation\Component\Input\Field\$options, $ref_id, ilPageContentGUI\$requested_ref_id, ilPageContentGUI\$tpl, ilObject\_lookupObjId(), ilObject\_lookupType(), ilObjectPlugin\getPluginObjectByType(), hasOtherBlock(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\UI\examples\Symbol\Glyph\Sort\sort(), 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 359 of file class.ilPCResourcesGUI.php.

361 : string {
362 global $DIC;
363
364 $obj_definition = $DIC["objDefinition"];
365 $item_ref_ids = [];
366
367 $lng = $DIC->language();
368 $ref_id = $DIC
369 ->copage()
370 ->internal()
371 ->gui()
372 ->pc()
373 ->editRequest()
374 ->getRefId();
375 $item_presentation_manager = $DIC->container()->internal()
376 ->domain()
377 ->content()
378 ->itemPresentation(
380 null
381 );
382 $block_sequence = $item_presentation_manager->getItemBlockSequence();
383
384 foreach ($block_sequence->getBlocks() as $block) {
385 // render block
386 $tpl = new ilTemplate("tpl.resource_block.html", true, true, "components/ILIAS/COPage");
387 $cnt = 0;
388 $max = 5;
389 if (!($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) &&
390 count($block->getItemRefIds()) > 0) {
391 foreach ($block->getItemRefIds() as $ref_id) {
392 $data = $item_presentation_manager->getRawDataByRefId($ref_id);
393 if ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
394 if ($data["type"] === "itgr" || in_array($ref_id, $item_ref_ids)) {
395 continue;
396 }
397 }
398
399 if ($cnt < $max) {
400 $tpl->setCurrentBlock("row");
402 "IMG",
404 ilObject::_getIcon((int) $data["obj_id"], "small"),
405 null,
406 "",
407 "",
408 0,
409 "",
410 "ilListItemIcon"
411 )
412 );
413
414 $tpl->setVariable("TITLE", $data["title"]);
416 }
417 if ($cnt == $max) {
418 $tpl->setCurrentBlock("row");
420 ilObject::_getIcon((int) $data["obj_id"], "small"),
421 null,
422 "",
423 "",
424 0,
425 "",
426 "ilListItemIcon"
427 ));
428 $tpl->setVariable("TITLE", "...");
430 }
431 $cnt++;
432 $item_ref_ids[$ref_id] = $ref_id;
433 }
434 } elseif (count($block->getObjectiveIds()) > 0) {
435 foreach ($block->getObjectiveIds() as $objective_id) {
436 $title = \ilCourseObjective::lookupObjectiveTitle($objective_id);
437 if ($cnt < $max) {
438 $tpl->setCurrentBlock("row");
440 ilUtil::getImagePath("icon_lobj.svg"),
441 null,
442 "",
443 "",
444 0,
445 "",
446 "ilListItemIcon"
447 ));
448 $tpl->setVariable("TITLE", $title);
450 }
451 if ($cnt == $max) {
452 $tpl->setCurrentBlock("row");
454 ilUtil::getImagePath("icon_lobj.svg"),
455 null,
456 "",
457 "",
458 0,
459 "",
460 "ilListItemIcon"
461 ));
462 $tpl->setVariable("TITLE", "...");
464 }
465 $cnt++;
466 }
467 } else {
468 $tpl->setCurrentBlock("row");
469 $tpl->setVariable("TITLE", $lng->txt("no_items"));
471 }
472 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock) {
473 $type = $block->getId();
474
475 if (!$obj_definition->isPlugin($type)) {
476 $title = $lng->txt("objs_" . $type);
477 } else {
479 $title = $pl->txt("objs_" . $type);
480 }
481
482 $tpl->setVariable("HEADER", $title);
483 $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
484 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
485 $type = $block->getId();
486 $tpl->setVariable("HEADER", $lng->txt("objs_sess"));
487 $a_content = str_replace("[list-" . $type . "]", $tpl->get(), $a_content);
488 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
489 $id = $block->getId();
492 ));
493 $a_content = str_replace("[item-group-" . $id . "]", $tpl->get(), $a_content);
494 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
495 $id = $block->getId();
496 $tpl->setVariable("HEADER", $lng->txt("crs_objectives"));
497 $a_content = str_replace("[list-_lobj]", $tpl->get(), $a_content);
498 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
499 $id = $block->getId();
500 $tpl->setVariable("HEADER", $lng->txt("cont_content"));
501 $a_content = str_replace("[list-_other]", $tpl->get(), $a_content);
502 }
503 }
504 return $a_content;
505 }
$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 238 of file class.ilPCResourcesGUI.php.

238 : bool
239 {
240 foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
241 if ($part instanceof \ILIAS\Container\Content\ItemGroupBlocks) {
242 return true;
243 }
244 }
245 return false;
246 }

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 258 of file class.ilPCResourcesGUI.php.

258 : bool
259 {
260 foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
261 if ($part instanceof \ILIAS\Container\Content\ObjectivesBlock) {
262 return true;
263 }
264 }
265 return false;
266 }

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 248 of file class.ilPCResourcesGUI.php.

248 : bool
249 {
250 foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
251 if ($part instanceof \ILIAS\Container\Content\OtherBlock) {
252 return true;
253 }
254 }
255 return false;
256 }

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 268 of file class.ilPCResourcesGUI.php.

268 : bool
269 {
270 foreach ($this->getContainerViewManager()->getBlockSequence()->getParts() as $part) {
271 if ($part instanceof \ILIAS\Container\Content\TypeBlocks) {
272 return true;
273 }
274 }
275 return false;
276 }

References getContainerViewManager().

+ Here is the call graph for this function:

◆ update()

ilPCResourcesGUI::update ( )

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

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

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: