ILIAS  trunk Revision v12.0_alpha-1329-g1094ddb0c33
ilFooterStandardGroupsProvider Class Reference
+ Inheritance diagram for ilFooterStandardGroupsProvider:
+ Collaboration diagram for ilFooterStandardGroupsProvider:

Public Member Functions

 __construct (Container $dic)
 
 getIdentificationFor (ilFooterStandardGroups $group)
 
 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)
 

Private Attributes

readonly Translator $translator
 

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()

ilFooterStandardGroupsProvider::__construct ( Container  $dic)

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

Definition at line 36 of file class.ilFooterStandardGroupsProvider.php.

37 {
39 $this->translator = new Translator($dic);
40 }
$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()

ilFooterStandardGroupsProvider::buildURI ( string  $from_path)
private

Definition at line 65 of file class.ilFooterStandardGroupsProvider.php.

65 : URI
66 {
67 return new URI(rtrim(ILIAS_HTTP_PATH, '/') . '/' . ltrim($from_path, '/'));
68 }
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35

Referenced by getEntries().

+ Here is the caller graph for this function:

◆ getAdditionalTexts()

ilFooterStandardGroupsProvider::getAdditionalTexts ( )

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

Definition at line 121 of file class.ilFooterStandardGroupsProvider.php.

121 : array
122 {
123 $ilias_version = ILIAS_VERSION;
124 $text = "powered by ILIAS (v{$ilias_version})";
125
126 return [
127 $this->item_factory->text(
128 $this->id_factory->identifier('ilias_version'),
129 $text
130 )
131 ];
132 }
const ILIAS_VERSION
$text
Definition: xapiexit.php:21

References $text, and ILIAS_VERSION.

◆ getEntries()

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

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

Definition at line 70 of file class.ilFooterStandardGroupsProvider.php.

70 : array
71 {
72 $entries = [];
73 // Imprint
74
75 // there was another check $base_class !== \ilImprintGUI::class &&
76
77 $imprint_title = $this->dic->language()->txt("imprint");
78
79 $entries[] = $this->item_factory
80 ->link(
81 $this->id_factory->identifier('imprint'),
82 $imprint_title
83 )
84 ->withAvailableCallable(
85 fn() => \ilImprint::isActive()
86 )
87 ->withAction(new URI(\ilLink::_getStaticLink(0, "impr")))
88 ->withParent($this->getIdentificationFor(ilFooterStandardGroups::LEGAL_INFORMATION));
89
90 // system support contacts
91 if (($system_support_url = \ilSystemSupportContactsGUI::getFooterLink()) !== null) {
92 $system_support_title = \ilSystemSupportContactsGUI::getFooterText();
93 $entries[] = $this->item_factory
94 ->link(
95 $this->id_factory->identifier('system_support'),
96 $system_support_title
97 )
98 ->withAction($system_support_url)
99 ->withParent($this->getIdentificationFor(ilFooterStandardGroups::SUPPORT));
100 }
101
102 // output translation link
104 $translation_title = $this->dic->language()->txt('translation');
105 $entries[] = $this->item_factory
106 ->link(
107 $this->id_factory->identifier('translation'),
108 $translation_title
109 )
110 ->withAvailableCallable(
112 )
113 ->withAction($this->buildURI($translation_url))
114 ->withOpenInNewViewport(true)
116
117 return $entries;
118 }
getIdentificationFor(ilFooterStandardGroups $group)
static isActive()
static _checkTranslate()
Permission check for translations.
static _isPageTranslation()
Check if the current request is a page translation.
static _getTranslationLink()
Get the link to translate the current page.
static getFooterLink()
Get a contact link to be shown in the footer.
static getFooterText()
Get the text for a contact link to be shown in the footer.

References ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), buildURI(), ilSystemSupportContactsGUI\getFooterLink(), ilSystemSupportContactsGUI\getFooterText(), getIdentificationFor(), ilImprint\isActive(), and SERVICES.

+ Here is the call graph for this function:

◆ getGroups()

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

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

Definition at line 47 of file class.ilFooterStandardGroupsProvider.php.

47 : array
48 {
49 return [
50 $this->item_factory->group(
51 $this->getIdentificationFor(ilFooterStandardGroups::LEGAL_INFORMATION),
52 $this->translator->translate('legal_information')
53 )->withPosition(20),
54 $this->item_factory->group(
55 $this->getIdentificationFor(ilFooterStandardGroups::SUPPORT),
56 $this->translator->translate('support')
57 )->withPosition(30),
58 $this->item_factory->group(
60 $this->translator->translate('services')
61 )->withPosition(40),
62 ];
63 }

References getIdentificationFor(), and SERVICES.

+ Here is the call graph for this function:

◆ getIdentificationFor()

ilFooterStandardGroupsProvider::getIdentificationFor ( ilFooterStandardGroups  $group)

Definition at line 42 of file class.ilFooterStandardGroupsProvider.php.

43 {
44 return $this->id_factory->identifier($group->value);
45 }

Referenced by getEntries(), and getGroups().

+ Here is the caller graph for this function:

◆ getPermanentURI()

ilFooterStandardGroupsProvider::getPermanentURI ( )

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

Definition at line 134 of file class.ilFooterStandardGroupsProvider.php.

134 : ?Permanent
135 {
136 $permanant_link = PageContentProvider::getPermaLink();
137 if (empty($permanant_link)) {
138 return null;
139 }
140
141 return $this->item_factory->permanent(
142 $this->id_factory->identifier('permanent'),
143 $this->translator->translate('permanent'),
144 new URI($permanant_link)
145 );
146 }

Field Documentation

◆ $translator

readonly Translator ilFooterStandardGroupsProvider::$translator
private

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


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