[TASK] Change @deprecated annotation to the correct version
[Packages/TYPO3.CMS.git] / typo3 / sysext / about / Classes / Controller / AboutController.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2012 Christian Kuhn <lolli@schwarzbu.ch>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27
28 /**
29 * Module 'about' shows some standard information for TYPO3 CMS: About-text, version number and so on.
30 *
31 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
32 * @author Steffen Kamper <steffen@typo3.org>
33 * @author Christian Kuhn <lolli@schwarzbu.ch>
34 * @package TYPO3
35 * @subpackage about
36 */
37 class Tx_About_Controller_AboutController extends Tx_Extbase_MVC_Controller_ActionController {
38 /**
39 * @var Tx_About_Domain_Repository_ExtensionRepository
40 */
41 protected $extensionRepository;
42
43 /**
44 * @param Tx_About_Domain_Repository_ExtensionRepository
45 * @return void
46 */
47 public function injectExtensionRepository(Tx_About_Domain_Repository_ExtensionRepository $extensionRepository) {
48 $this->extensionRepository = $extensionRepository;
49 }
50
51 /**
52 * Main action: Show standard information
53 *
54 * @return void
55 */
56 public function indexAction() {
57 $extensions = $this->extensionRepository->findAllLoaded();
58 $this->view
59 ->assign('TYPO3Version', TYPO3_version)
60 ->assign('TYPO3CopyrightYear', TYPO3_copyright_year)
61 ->assign('TYPO3UrlDonate', TYPO3_URL_DONATE)
62 ->assign('loadedExtensions', $extensions)
63 ->assign('customContents', $this->getCustomContent());
64 }
65
66 /**
67 * Hook to add custom content
68 *
69 * @return array with additional content sections
70 * @deprecated Since 4.7; will be removed together with the call in indexAction and the fluid partial in 6.1
71 */
72 protected function getCustomContent() {
73 $sections = array();
74 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'])) {
75 t3lib_div::deprecationLog(
76 'Hook about/index.php addSection is deprecated and will be removed in TYPO3 6.1, use fluid overrides instead.'
77 );
78
79 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['about/index.php']['addSection'] as $classRef) {
80 /** @var $hookObject tx_about_customSections */
81 $hookObject = t3lib_div::getUserObj($classRef);
82 if (!($hookObject instanceof tx_about_customSections)) {
83 throw new UnexpectedValueException(
84 '$hookObject must implement interface tx_about_customSections',
85 1298121573
86 );
87 }
88 $hookObject->addSection($sections);
89 }
90 }
91 return $sections;
92 }
93 }
94 ?>