[TASK] Re-work/simplify copyright header in PHP files - Part 9
[Packages/TYPO3.CMS.git] / typo3 / sysext / rsaauth / Classes / Hook / BackendHookForAjaxLogin.php
1 <?php
2 namespace TYPO3\CMS\Rsaauth\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 use TYPO3\CMS\Backend\Utility\BackendUtility;
17
18 /**
19 * This class adds RSA JavaScript to the backend
20 */
21 class BackendHookForAjaxLogin {
22 /**
23 * Adds RSA-specific JavaScript
24 *
25 * @param array $configuration
26 * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController
27 * @return void
28 */
29 public function addRsaJsLibraries(array $configuration, \TYPO3\CMS\Backend\Controller\BackendController $backendController) {
30 $javascriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('rsaauth') . 'resources/';
31 $files = array(
32 'jsbn/jsbn.js',
33 'jsbn/prng4.js',
34 'jsbn/rng.js',
35 'jsbn/rsa.js',
36 'jsbn/base64.js'
37 );
38 foreach ($files as $file) {
39 $backendController->getPageRenderer()->addJsLibrary($file, $javascriptPath . $file);
40 }
41 }
42 }