Resolves #45809: Refactor code and introduce namespacing
[TYPO3CMS/Extensions/static_info_tables.git] / class.tx_staticinfotables_syslanguage.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2004-2008 René Fritz (r.fritz@colorcube.de)
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 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24 /**
25 * example for using the hotlist functionality with the sys_language table
26 *
27 * $Id$
28 *
29 * @author René Fritz <r.fritz@colorcube.de>
30 * @package TYPO3
31 */
32
33
34
35 /**
36 * example for using the hotlist functionality with the sys_language table
37 *
38 * @author René Fritz <r.fritz@colorcube.de>
39 * @package TYPO3
40 */
41 class tx_staticinfotables_syslanguage {
42
43 function processDatamap_postProcessFieldArray($status, $table, $id, $fieldArray, &$pObj) {
44 if($table == 'sys_language' && $fieldArray['static_lang_isocode']) {
45 // the hotlist will be updated only if the field changed, because only then it's in the $fieldArray
46 \SJBR\StaticInfoTables\Utility\EntityLabelUtility::updateHotlist('static_languages', $fieldArray['static_lang_isocode'], 'uid');
47 }
48 }
49 }
50
51 ?>