ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 $request = $this->dic->http()->request()->getUri();
68 return new URI($request->getScheme() . '://' . $request->getHost() . '/' . ltrim($from_path, '/'));
69 }
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 125 of file class.ilFooterStandardGroupsProvider.php.

125 : array
126 {
127 $ilias_version = ILIAS_VERSION;
128 $text = "powered by ILIAS (v{$ilias_version})";
129
130 return [
131 $this->item_factory->text(
132 $this->id_factory->identifier('ilias_version'),
133 $text
134 )
135 ];
136 }
const ILIAS_VERSION

References 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 71 of file class.ilFooterStandardGroupsProvider.php.

71 : array
72 {
73 $entries = [];
74 // Imprint
75
76 // there was another check $base_class !== \ilImprintGUI::class &&
77
78 $imprint_title = $this->dic->language()->txt("imprint");
79
80 $entries[] = $this->item_factory
81 ->link(
82 $this->id_factory->identifier('imprint'),
83 $imprint_title
84 )
85 ->withAvailableCallable(
86 fn() => \ilImprint::isActive()
87 )
88 ->withAction(new URI(\ilLink::_getStaticLink(0, "impr")))
89 ->withParent($this->getIdentificationFor(ilFooterStandardGroups::LEGAL_INFORMATION));
90
91 // system support contacts
92
93 $system_support_url = \ilSystemSupportContactsGUI::getFooterLink();
94 $system_support_title = \ilSystemSupportContactsGUI::getFooterText();
95 $entries[] = $this->item_factory
96 ->link(
97 $this->id_factory->identifier('system_support'),
98 $system_support_title
99 )
100 ->withAvailableCallable(
101 fn() => !empty($system_support_url)
102 )
103 ->withAction($this->buildURI($system_support_url))
104 ->withParent($this->getIdentificationFor(ilFooterStandardGroups::SUPPORT));
105
106 // output translation link
108 $translation_title = $this->dic->language()->txt('translation');
109 $entries[] = $this->item_factory
110 ->link(
111 $this->id_factory->identifier('translation'),
112 $translation_title
113 )
114 ->withAvailableCallable(
116 )
117 ->withAction($this->buildURI($translation_url))
118 ->withOpenInNewViewport(true)
120
121 return $entries;
122 }
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.

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 138 of file class.ilFooterStandardGroupsProvider.php.

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

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: