ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilFooterCustomGroupsProvider Class Reference
+ Inheritance diagram for ilFooterCustomGroupsProvider:
+ Collaboration diagram for ilFooterCustomGroupsProvider:

Public Member Functions

 __construct (Container $dic)
 
 getNewIdentification ()
 
 getGroupsRepository ()
 
 getEntriesRepository ()
 
 getGroups ()
 
 getEntries ()
 
 getAdditionalTexts ()
 
 getPermanentURI ()
 
 __construct (Container $dic)
 
 getAdditionalTexts ()
 
 getPermanentURI ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getGroups ()
 
 getEntries ()
 
 getAdditionalTexts ()
 
 getPermanentURI ()
 

Private Member Functions

 buildURI (string $from_path)
 
 txt (string $key)
 

Private Attributes

readonly GroupsRepositoryDB $groups_repository
 
readonly EntriesRepositoryDB $entries_repository
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticFooterProvider
IdentificationProviderInterface $id_factory
 
FooterItemFactory $item_factory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilFooterCustomGroupsProvider::__construct ( Container  $dic)

Reimplemented from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticFooterProvider.

Definition at line 37 of file class.ilFooterCustomGroupsProvider.php.

38 {
40 $this->groups_repository = new GroupsRepositoryDB($dic->database(), $this);
41 $this->entries_repository = new EntriesRepositoryDB($dic->database(), $this);
42 }
$dic
Definition: ltiresult.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $dic, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildURI()

ilFooterCustomGroupsProvider::buildURI ( string  $from_path)
private

Definition at line 111 of file class.ilFooterCustomGroupsProvider.php.

111 : URI
112 {
113 $request = $this->dic->http()->request()->getUri();
114 return new URI($request->getScheme() . '://' . $request->getHost() . '/' . ltrim($from_path, '/'));
115 }
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35

◆ getAdditionalTexts()

ilFooterCustomGroupsProvider::getAdditionalTexts ( )

Reimplemented from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticFooterProvider.

Definition at line 118 of file class.ilFooterCustomGroupsProvider.php.

118 : array
119 {
120 return [];
121 }

◆ getEntries()

ilFooterCustomGroupsProvider::getEntries ( )
Returns
isItem[] These are Entries which will be available for configuration.

Implements ILIAS\GlobalScreen\Scope\Footer\Provider\StaticFooterProvider.

Definition at line 81 of file class.ilFooterCustomGroupsProvider.php.

81 : array
82 {
83 $entries = [];
84
85 foreach ($this->entries_repository->all() as $entry) {
86 if ($entry->isCore()) {
87 continue;
88 }
89 if (!$entry->isActive()) {
90 continue;
91 }
92 try {
93 $action = new URI($entry->getAction());
94 } catch (Throwable) {
95 continue;
96 }
97
98 $entries[] = $this->item_factory->link(
99 $this->dic->globalScreen()->identification()->fromSerializedIdentification($entry->getId()),
100 $entry->getTitle(),
101 )->withParent(
102 $this->dic->globalScreen()->identification()->fromSerializedIdentification($entry->getParent())
103 )->withAction(
104 $action
105 )->withOpenInNewViewport($entry->isExternal());
106 }
107
108 return $entries;
109 }

◆ getEntriesRepository()

ilFooterCustomGroupsProvider::getEntriesRepository ( )

Definition at line 54 of file class.ilFooterCustomGroupsProvider.php.

55 {
57 }
readonly EntriesRepositoryDB $entries_repository

References $entries_repository.

◆ getGroups()

ilFooterCustomGroupsProvider::getGroups ( )
Returns
TopParentItem[] These are Slates which will be available for configuration.

Implements ILIAS\GlobalScreen\Scope\Footer\Provider\StaticFooterProvider.

Definition at line 61 of file class.ilFooterCustomGroupsProvider.php.

61 : array
62 {
63 $groups = [];
64
65 foreach ($this->groups_repository->all() as $group) {
66 if ($group->isCore()) {
67 continue;
68 }
69 if (!$group->isActive()) {
70 continue;
71 }
72 $groups[] = $this->item_factory->group(
73 $this->dic->globalScreen()->identification()->fromSerializedIdentification($group->getId()),
74 $group->getTitle(),
75 );
76 }
77
78 return $groups;
79 }

◆ getGroupsRepository()

ilFooterCustomGroupsProvider::getGroupsRepository ( )

Definition at line 49 of file class.ilFooterCustomGroupsProvider.php.

50 {
52 }

References $groups_repository.

◆ getNewIdentification()

ilFooterCustomGroupsProvider::getNewIdentification ( )

Definition at line 44 of file class.ilFooterCustomGroupsProvider.php.

45 {
46 return $this->id_factory->identifier(uniqid('', true));
47 }

◆ getPermanentURI()

ilFooterCustomGroupsProvider::getPermanentURI ( )

◆ txt()

ilFooterCustomGroupsProvider::txt ( string  $key)
private

Definition at line 128 of file class.ilFooterCustomGroupsProvider.php.

128 : string
129 {
130 return $this->dic->language()->txt($key);
131 }

Field Documentation

◆ $entries_repository

readonly EntriesRepositoryDB ilFooterCustomGroupsProvider::$entries_repository
private

Definition at line 35 of file class.ilFooterCustomGroupsProvider.php.

Referenced by getEntriesRepository().

◆ $groups_repository

readonly GroupsRepositoryDB ilFooterCustomGroupsProvider::$groups_repository
private

Definition at line 34 of file class.ilFooterCustomGroupsProvider.php.

Referenced by getGroupsRepository().


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