ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Wiki\Media\PageRetrieval Class Reference
+ Inheritance diagram for ILIAS\Wiki\Media\PageRetrieval:
+ Collaboration diagram for ILIAS\Wiki\Media\PageRetrieval:

Public Member Functions

 __construct (protected PageManager $page_manager, protected ilCtrl $ctrl)
 
 getPossibleTypes ()
 
 getAllIDsForType (string $type)
 
 getLinkToSubObject (string $type, int $id)
 
 getTitleOfSubObject (string $type, int $id)
 
 getPossibleTypes ()
 
 getAllIDsForType (string $type)
 
 getLinkToSubObject (string $type, int $id)
 
 getTitleOfSubObject (string $type, int $id)
 

Protected Member Functions

 getPageTitleByID ()
 

Protected Attributes

array $page_titles_by_id
 

Detailed Description

Definition at line 28 of file PageRetrieval.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Wiki\Media\PageRetrieval::__construct ( protected PageManager  $page_manager,
protected ilCtrl  $ctrl 
)

Definition at line 35 of file PageRetrieval.php.

38 {
39 }

Member Function Documentation

◆ getAllIDsForType()

ILIAS\Wiki\Media\PageRetrieval::getAllIDsForType ( string  $type)
Returns
int[]

Implements ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval.

Definition at line 67 of file PageRetrieval.php.

67 : Generator
68 {
69 if ($type !== 'wpg:pg') {
70 return;
71 }
72 yield from array_keys($this->getPageTitleByID());
73 }

References ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), and ILIAS\Wiki\Media\PageRetrieval\getPageTitleByID().

+ Here is the call graph for this function:

◆ getLinkToSubObject()

ILIAS\Wiki\Media\PageRetrieval::getLinkToSubObject ( string  $type,
int  $id 
)

Implements ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval.

Definition at line 75 of file PageRetrieval.php.

75 : string
76 {
77 if ($type !== 'wpg:pg') {
78 return '';
79 }
80 return $this->page_manager->getPermaLink($id);
81 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

◆ getPageTitleByID()

ILIAS\Wiki\Media\PageRetrieval::getPageTitleByID ( )
protected
Returns
string[]

Definition at line 44 of file PageRetrieval.php.

44 : array
45 {
46 if (isset($this->page_titles_by_id)) {
48 }
49 $this->page_titles_by_id = [];
50 foreach ($this->page_manager->getWikiPages() as $page) {
51 $this->page_titles_by_id[$page->getId()] = $page->getTitle();
52 }
54 }

References ILIAS\Wiki\Media\PageRetrieval\$page_titles_by_id.

Referenced by ILIAS\Wiki\Media\PageRetrieval\getAllIDsForType(), and ILIAS\Wiki\Media\PageRetrieval\getTitleOfSubObject().

+ Here is the caller graph for this function:

◆ getPossibleTypes()

ILIAS\Wiki\Media\PageRetrieval::getPossibleTypes ( )
Returns
string[]

Implements ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval.

Definition at line 59 of file PageRetrieval.php.

59 : Generator
60 {
61 yield 'wpg:pg';
62 }

◆ getTitleOfSubObject()

ILIAS\Wiki\Media\PageRetrieval::getTitleOfSubObject ( string  $type,
int  $id 
)

Implements ILIAS\MediaObjects\OverviewGUI\SubObjectRetrieval.

Definition at line 83 of file PageRetrieval.php.

83 : string
84 {
85 if ($type !== 'wpg:pg') {
86 return '';
87 }
88 return $this->getPageTitleByID()[$id] ?? '';
89 }

References $id, and ILIAS\Wiki\Media\PageRetrieval\getPageTitleByID().

+ Here is the call graph for this function:

Field Documentation

◆ $page_titles_by_id

array ILIAS\Wiki\Media\PageRetrieval::$page_titles_by_id
protected

Definition at line 33 of file PageRetrieval.php.

Referenced by ILIAS\Wiki\Media\PageRetrieval\getPageTitleByID().


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