[TASK] FormEngine JS refactoring: copy JS files
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / FormProtection / DisabledFormProtection.php
1 <?php
2 namespace TYPO3\CMS\Core\FormProtection;
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 * This class is a dummy implementation of the form protection,
19 * which is used when no authentication is used.
20 *
21 * @author Helmut Hummel <helmut.hummel@typo3.org>
22 */
23 class DisabledFormProtection extends AbstractFormProtection {
24
25 /**
26 * Disable parent constructor
27 */
28 public function __construct() {
29
30 }
31
32 /**
33 * Disable parent method
34 */
35 public function generateToken($formName, $action = '', $formInstanceName = '') {
36 return 'dummyToken';
37 }
38
39 /**
40 * Disable parent method.
41 * Always return TRUE.
42 *
43 * @param string $tokenId
44 * @param string $formName
45 * @param string $action
46 * @param string $formInstanceName
47 * @return bool
48 */
49 public function validateToken($tokenId, $formName, $action = '', $formInstanceName = '') {
50 return TRUE;
51 }
52
53 /**
54 * Dummy implementation
55 */
56 protected function createValidationErrorMessage() {
57
58 }
59
60 /**
61 * Dummy implementation
62 */
63 protected function retrieveSessionToken() {
64
65 }
66
67 /**
68 * Dummy implementation
69 */
70 public function persistSessionToken() {
71
72 }
73
74 }