ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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)
 

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

Referenced by getEntries().

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

◆ getAdditionalTexts()

ilFooterStandardGroupsProvider::getAdditionalTexts ( )

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

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

References ILIAS_VERSION.

124  : array
125  {
126  $ilias_version = ILIAS_VERSION;
127  $text = "powered by ILIAS (v{$ilias_version})";
128 
129  return [
130  $this->item_factory->text(
131  $this->id_factory->identifier('ilias_version'),
132  $text
133  )
134  ];
135  }
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 71 of file class.ilFooterStandardGroupsProvider.php.

References ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), buildURI(), ilSystemSupportContactsGUI\getFooterLink(), 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().

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

References null.

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

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: