‪TYPO3CMS  11.5
T3GeneralInformationWidget.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
23 
32 {
36  private ‪$configuration;
37 
41  private ‪$view;
42 
46  private ‪$options;
47 
48  public function ‪__construct(
51  array ‪$options = []
52  ) {
53  $this->configuration = ‪$configuration;
54  $this->view = ‪$view;
55  $this->options = ‪$options;
56  }
57 
58  public function ‪renderWidgetContent(): string
59  {
60  $typo3Information = new ‪Typo3Information();
61  $typo3Version = new ‪Typo3Version();
62 
63  $this->view->setTemplate('Widget/T3GeneralInformationWidget');
64  $this->view->assignMultiple([
65  'title' => 'TYPO3 CMS ' . $typo3Version->getVersion(),
66  'copyrightYear' => $typo3Information->getCopyrightYear(),
67  'currentVersion' => $typo3Version->getVersion(),
68  'donationUrl' => $typo3Information::URL_DONATE,
69  'copyRightNotice' => $typo3Information->getCopyrightNotice(),
70  'options' => $this->options,
71  'configuration' => $this->configuration,
72  ]);
73  return $this->view->render();
74  }
75 
79  public function ‪getOptions(): array
80  {
81  return ‪$this->options;
82  }
83 }
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\$view
‪StandaloneView $view
Definition: T3GeneralInformationWidget.php:39
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\$configuration
‪WidgetConfigurationInterface $configuration
Definition: T3GeneralInformationWidget.php:35
‪TYPO3\CMS\Core\Information\Typo3Information
Definition: Typo3Information.php:28
‪TYPO3\CMS\Core\Information\Typo3Version
Definition: Typo3Version.php:21
‪TYPO3\CMS\Dashboard\Widgets\WidgetInterface
Definition: WidgetInterface.php:26
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\renderWidgetContent
‪renderWidgetContent()
Definition: T3GeneralInformationWidget.php:55
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\$options
‪array $options
Definition: T3GeneralInformationWidget.php:43
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\getOptions
‪array getOptions()
Definition: T3GeneralInformationWidget.php:76
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget
Definition: T3GeneralInformationWidget.php:32
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:31
‪TYPO3\CMS\Dashboard\Widgets
Definition: AdditionalCssInterface.php:18
‪TYPO3\CMS\Dashboard\Widgets\WidgetConfigurationInterface
Definition: WidgetConfigurationInterface.php:26
‪TYPO3\CMS\Dashboard\Widgets\T3GeneralInformationWidget\__construct
‪__construct(WidgetConfigurationInterface $configuration, StandaloneView $view, array $options=[])
Definition: T3GeneralInformationWidget.php:45