Cleanup: Updated copyright comments
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / hooks / class.tx_cms_mediaitems.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
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 * Adds extra fields into 'media' flexform
30 *
31 * @package TYPO3
32 * @subpackage cms
33 */
34
35 class tx_cms_mediaItems implements t3lib_Singleton {
36
37 /**
38 * Load extra render types if they exist
39 *
40 * @param array $params: Existing types by reference
41 * @param array $conf: config array
42 */
43 public function customMediaRenderTypes(&$params, $conf) {
44 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaRenderTypes'])) {
45 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaRenderTypes'] as $classRef) {
46 $hookObj = t3lib_div::getUserObj($classRef);
47 $hookObj->customMediaRenderTypes($params, $conf);
48 }
49 }
50
51
52 }
53
54 /**
55 * Load extra predefined media params if they exist
56 *
57 * @param array $params: Existing types by reference
58 * @param array $conf: config array
59 */
60 public function customMediaParams(&$params, $conf) {
61
62 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'])) {
63 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'] as $classRef) {
64 $hookObj = t3lib_div::getUserObj($classRef);
65 $hookObj->customMediaParams($params, $conf);
66 }
67 }
68
69
70 }
71 }
72
73 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/hooks/class.tx_cms_mediaitems.php'])) {
74 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/hooks/class.tx_cms_mediaitems.php']);
75 }
76 ?>