ILIAS
trunk Revision v12.0_alpha-33-ge186251a14d
◀ ilDoc Overview
PageRetrieval.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LearningModule\Media
;
22
23
use Generator;
24
use
ilCtrl
;
25
use
ilLMPageObject
;
26
use
ilLMPageObjectGUI
;
27
use
ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval
;
28
29
class
PageRetrieval
implements
SubObjectRetrieval
30
{
31
public
function
__construct
(
32
protected
int
$obj_id,
33
protected
ilCtrl
$ctrl
34
) {
35
}
36
40
public
function
getPossibleTypes
(): Generator
41
{
42
yield
'lm:pg'
;
43
}
44
48
public
function
getAllIDsForType
(
string
$type): Generator
49
{
50
if
($type !==
'lm:pg'
) {
51
return
;
52
}
53
foreach
(
ilLMPageObject::getPageList
($this->obj_id) as $page) {
54
yield (
int
) $page[
'obj_id'
];
55
}
56
}
57
58
public
function
getLinkToSubObject
(
string
$type,
int
$id
): string
59
{
60
if
($type !==
'lm:pg'
) {
61
return
''
;
62
}
63
$this->
ctrl
->setParameterByClass(ilLMPageObjectGUI::class,
'obj_id'
,
$id
);
64
$link = $this->
ctrl
->getLinkTargetByClass(ilLMPageObjectGUI::class,
'edit'
);
65
$this->
ctrl
->clearParameterByClass(ilLMPageObjectGUI::class,
'obj_id'
);
66
return
$link;
67
}
68
69
public
function
getTitleOfSubObject
(
string
$type,
int
$id
): string
70
{
71
if
($type !==
'lm:pg'
) {
72
return
''
;
73
}
74
return
ilLMPageObject::_lookupTitle
(
$id
);
75
}
76
}
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
ILIAS\LearningModule\Media\PageRetrieval
Definition:
PageRetrieval.php:30
ILIAS\LearningModule\Media\PageRetrieval\getAllIDsForType
getAllIDsForType(string $type)
Definition:
PageRetrieval.php:48
ILIAS\LearningModule\Media\PageRetrieval\getPossibleTypes
getPossibleTypes()
Definition:
PageRetrieval.php:40
ILIAS\LearningModule\Media\PageRetrieval\__construct
__construct(protected int $obj_id, protected ilCtrl $ctrl)
Definition:
PageRetrieval.php:31
ILIAS\LearningModule\Media\PageRetrieval\getLinkToSubObject
getLinkToSubObject(string $type, int $id)
Definition:
PageRetrieval.php:58
ILIAS\LearningModule\Media\PageRetrieval\getTitleOfSubObject
getTitleOfSubObject(string $type, int $id)
Definition:
PageRetrieval.php:69
ilCtrl
Class ilCtrl provides processing control methods.
Definition:
class.ilCtrl.php:36
ilLMObject\_lookupTitle
static _lookupTitle(int $a_obj_id)
Definition:
class.ilLMObject.php:237
ilLMPageObjectGUI
User Interface for Learning Module Page Objects Editing.
Definition:
class.ilLMPageObjectGUI.php:29
ilLMPageObject
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilLMPageObject.php:34
ilLMPageObject\getPageList
static getPageList(int $lm_id)
Definition:
class.ilLMPageObject.php:204
ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval
Definition:
SubObjectRetrieval.php:26
ILIAS\LearningModule\Media
Definition:
PageRetrieval.php:21
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:62
components
ILIAS
LearningModule
Media
PageRetrieval.php
Generated on Mon Nov 3 2025 23:02:28 for ILIAS by
1.9.4 (using
Doxyfile
)