Added Feature #16641: Here comes FAL - beta2 version
[Packages/TYPO3.CMS.git] / typo3 / sysext / fal / classes / hooks / class.tx_fal_backendhook.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2010 FAL development team <fal@wmdb.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 * 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 * backend post construct hook
30 *
31 * @author FAL development team <fal@wmdb.de>
32 * @package TYPO3
33 * @subpackage tx_fal
34 * @version $Id: $
35 */
36
37
38 class tx_fal_backendhook {
39 /**
40 * adds a part of the extjs filelist module to the global
41 * framework if fal is loaded to be used in fal references
42 * tce forms upload dialog
43 * @param unknown_type $params
44 * @param TYPO3backend $parentObject
45 */
46 function constructPostProcess($params, TYPO3backend $parentObject) {
47 global $TYPO3_CONF_VARS;
48 $falPath = t3lib_extMgm::extRelPath('fal');
49 /** @var t3lib_PageRenderer $pageRenderer */
50 $pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
51 $pageRenderer->addJsFile('ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.FILELIST', NULL, FALSE);
52 $parentObject->addJavascriptFile($falPath . 'contrib/plupload/js/gears_init.js');
53 $parentObject->addJavascriptFile($falPath . 'contrib/plupload/js/plupload.full.min.js');
54 $parentObject->addJavascriptFile($falPath . 'res/js/plupload/ext.ux.plupload.js');
55 $parentObject->addCssFile('ext.ux.plupload', $falPath . 'res/js/plupload/ext.ux.plupload.css');
56 $parentObject->addJavascriptFile($falPath . 'res/js/plupload/plupload.js');
57
58 tx_fal_list_Registry::addEbExtDirectNamespacesToPage($pageRenderer);
59 tx_fal_list_Registry::addEbJsComponentsToPage($pageRenderer);
60 tx_fal_list_Registry::addEbCssComponentsToPage($pageRenderer);
61
62 }
63 }
64
65 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_backendhook.php'])) {
66 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_backendhook.php']);
67 }
68 ?>