49d60d37f19fee79ae22a1e73a49e7cfd55d07b9
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3skin / Classes / Hook / StyleGenerationHook.php
1 <?php
2 namespace TYPO3\CMS\T3skin\Hook;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Hook for adding styles to backend page-generation in DocumentTemplate
19 *
20 * @author Stefan Neufeind <info [at] speedpartner.de>
21 * @deprecated since TYPO3 CMS 7, will be removed in CMS 8
22 */
23 class StyleGenerationHook {
24
25 /**
26 * Hooks into the \TYPO3\CMS\Backend\Template\DocumentTemplate::startPage and adds styles based on settings
27 * from color-schema from $GLOBALS['TBE_STYLES']
28 *
29 * @param array $hookParameters
30 * @param \TYPO3\CMS\Backend\Template\DocumentTemplate $documentTemplate Reference to instance of DocumentTemplate
31 * @return void
32 */
33 public function preStartPageHook($hookParameters, \TYPO3\CMS\Backend\Template\DocumentTemplate $documentTemplate) {
34 $documentTemplate->inDocStylesArray['TYPO3\\CMS\\T3skin\\Hook\\StyleGenerationHook'] = 'tr.typo3-CSM-itemRow:hover {background-color: ' . $GLOBALS['TBE_STYLES']['scriptIDindex']['typo3/alt_clickmenu.php']['mainColors']['bgColor5'] . ';} ';
35 }
36
37 }