ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilFooterStandardGroupsProvider Class Reference
+ Inheritance diagram for ilFooterStandardGroupsProvider:
+ Collaboration diagram for ilFooterStandardGroupsProvider:

Public Member Functions

 __construct (Container $dic)
 
 getIdentificationFor (ilFooterStandardGroups $group)
 
 getGroups ()
 
 getEntries ()
 
 getAdditionalTexts ()
 
 getPermanentURI ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticFooterProvider
 __construct (Container $dic)
 
 getAdditionalTexts ()
 
 getPermanentURI ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Private Member Functions

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

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)

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

References ILIAS\GlobalScreen\Provider\__construct().

37  {
38  parent::__construct($dic);
39  $this->translator = new Translator($dic);
40  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildURI()

ilFooterStandardGroupsProvider::buildURI ( string  $from_path)
private

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

Referenced by getEntries().

69  : URI
70  {
71  $request = $this->dic->http()->request()->getUri();
72  return new URI($request->getScheme() . '://' . $request->getHost() . '/' . ltrim($from_path, '/'));
73  }
+ Here is the caller graph for this function:

◆ getAdditionalTexts()

ilFooterStandardGroupsProvider::getAdditionalTexts ( )

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

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

References ILIAS_VERSION.

153  : array
154  {
155  $ilias_version = ILIAS_VERSION;
156  $text = "powered by ILIAS (v{$ilias_version})";
157 
158  return [
159  $this->item_factory->text(
160  $this->id_factory->identifier('ilias_version'),
161  $text
162  )
163  ];
164  }
const 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 75 of file class.ilFooterStandardGroupsProvider.php.

References ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), buildURI(), ilAccessibilitySupportContactsGUI\getFooterLink(), ilSystemSupportContactsGUI\getFooterLink(), ilAccessibilityControlConceptGUI\getFooterLink(), ilAccessibilitySupportContactsGUI\getFooterText(), ilAccessibilityControlConceptGUI\getFooterText(), ilSystemSupportContactsGUI\getFooterText(), getIdentificationFor(), ilImprint\isActive(), SERVICES, ILIAS\GlobalScreen\Scope\Footer\Factory\withAction(), ILIAS\GlobalScreen\Scope\Footer\Factory\withOpenInNewViewport(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withParent().

75  : array
76  {
77  $entries = [];
78  // Accessibility Items
79  // accessibility control concept
80  if (($accessibility_control_url = \ilAccessibilityControlConceptGUI::getFooterLink()) !== '') {
81  $accessibility_control_title = \ilAccessibilityControlConceptGUI::getFooterText();
82  $entries[] = $this->item_factory
83  ->link(
84  $this->id_factory->identifier('accessibility_control'),
85  $accessibility_control_title
86  )
87  ->withAction($this->buildURI($accessibility_control_url))
88  ->withParent($this->getIdentificationFor(ilFooterStandardGroups::ACCESSIBILITY));
89  }
90 
91  // report accessibility issue
92  if (($accessibility_report_url = \ilAccessibilitySupportContactsGUI::getFooterLink()) !== '') {
93  $accessibility_report_title = \ilAccessibilitySupportContactsGUI::getFooterText();
94  $entries[] = $this->item_factory
95  ->link(
96  $this->id_factory->identifier('accessibility_report'),
97  $accessibility_report_title
98  )
99  ->withAction($this->buildURI($accessibility_report_url))
100  ->withParent($this->getIdentificationFor(ilFooterStandardGroups::ACCESSIBILITY));
101  }
102 
103  // Imprint
104  /*$base_class = ($this->dic->http()->wrapper()->query()->has(\ilCtrlInterface::PARAM_BASE_CLASS)) ?
105  $this->dic->http()->wrapper()->query()->retrieve(
106  \ilCtrlInterface::PARAM_BASE_CLASS,
107  $this->dic->refinery()->kindlyTo()->string()
108  ) : null;*/
109 
110  // there was another check $base_class !== \ilImprintGUI::class &&
111  if (\ilImprint::isActive()) {
112  $imprint_title = $this->dic->language()->txt("imprint");
113 
114  $entries[] = $this->item_factory
115  ->link(
116  $this->id_factory->identifier('imprint'),
117  $imprint_title
118  )
119  ->withAction(new URI(\ilLink::_getStaticLink(0, "impr")))
120  ->withParent($this->getIdentificationFor(ilFooterStandardGroups::LEGAL_INFORMATION));
121  }
122 
123  // system support contacts
124  if (($system_support_url = \ilSystemSupportContactsGUI::getFooterLink()) !== '') {
125  $system_support_title = \ilSystemSupportContactsGUI::getFooterText();
126  $entries[] = $this->item_factory
127  ->link(
128  $this->id_factory->identifier('system_support'),
129  $system_support_title
130  )
131  ->withAction($this->buildURI($system_support_url))
132  ->withParent($this->getIdentificationFor(ilFooterStandardGroups::SUPPORT));
133  }
134 
135  // output translation link
137  $translation_url = \ilObjLanguageAccess::_getTranslationLink();
138  $translation_title = $this->dic->language()->txt('translation');
139  $entries[] = $this->item_factory
140  ->link(
141  $this->id_factory->identifier('translation'),
142  $translation_title
143  )
144  ->withAction($this->buildURI($translation_url))
145  ->withOpenInNewViewport(true)
147  }
148 
149  return $entries;
150  }
static _isPageTranslation()
Check if the current request is a page translation.
getIdentificationFor(ilFooterStandardGroups $group)
static _getTranslationLink()
Get the link to translate the current page.
withParent(IdentificationInterface $identification)
static _checkTranslate()
Permission check for translations.
static isActive()
+ 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.

References getIdentificationFor(), and SERVICES.

47  : array
48  {
49  return [
50  $this->item_factory->group(
51  $this->getIdentificationFor(ilFooterStandardGroups::ACCESSIBILITY),
52  $this->translator->translate('accessibility')
53  )->withPosition(10),
54  $this->item_factory->group(
55  $this->getIdentificationFor(ilFooterStandardGroups::LEGAL_INFORMATION),
56  $this->translator->translate('legal_information')
57  )->withPosition(20),
58  $this->item_factory->group(
59  $this->getIdentificationFor(ilFooterStandardGroups::SUPPORT),
60  $this->translator->translate('support')
61  )->withPosition(30),
62  $this->item_factory->group(
64  $this->translator->translate('services')
65  )->withPosition(40),
66  ];
67  }
getIdentificationFor(ilFooterStandardGroups $group)
+ Here is the call graph for this function:

◆ getIdentificationFor()

ilFooterStandardGroupsProvider::getIdentificationFor ( ilFooterStandardGroups  $group)

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

Referenced by getEntries(), and getGroups().

43  {
44  return $this->id_factory->identifier($group->value);
45  }
+ Here is the caller graph for this function:

◆ getPermanentURI()

ilFooterStandardGroupsProvider::getPermanentURI ( )

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

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

References null.

166  : ?Permanent
167  {
168  $permanant_link = PageContentProvider::getPermaLink();
169  if (empty($permanant_link)) {
170  return null;
171  }
172 
173  return $this->item_factory->permanent(
174  $this->id_factory->identifier('permanent'),
175  $this->translator->translate('permanent'),
176  new URI($permanant_link)
177  );
178  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ txt()

ilFooterStandardGroupsProvider::txt ( string  $key)
private

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

180  : string
181  {
182  return $this->dic->language()->txt($key);
183  }

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: