1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* 2017 Romain CANON <[email protected]> |
4
|
|
|
* |
5
|
|
|
* This file is part of the TYPO3 FormZ project. |
6
|
|
|
* It is free software; you can redistribute it and/or modify it |
7
|
|
|
* under the terms of the GNU General Public License, either |
8
|
|
|
* version 3 of the License, or any later version. |
9
|
|
|
* |
10
|
|
|
* For the full copyright and license information, see: |
11
|
|
|
* http://www.gnu.org/licenses/gpl-3.0.html |
12
|
|
|
*/ |
13
|
|
|
|
14
|
|
|
namespace Romm\Formz\Configuration\Settings; |
15
|
|
|
|
16
|
|
|
use Romm\Formz\Configuration\AbstractFormzConfiguration; |
17
|
|
|
use Romm\Formz\Configuration\Form\Field\Settings\FieldSettings; |
18
|
|
|
use Romm\Formz\Configuration\Form\Settings\FormSettings; |
19
|
|
|
use TYPO3\CMS\Core\Cache\Backend\FileBackend; |
20
|
|
|
|
21
|
|
|
class Settings extends AbstractFormzConfiguration |
22
|
|
|
{ |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
protected $defaultBackendCache = FileBackend::class; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var \Romm\Formz\Configuration\Form\Settings\FormSettings |
31
|
|
|
*/ |
32
|
|
|
protected $defaultFormSettings; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var \Romm\Formz\Configuration\Form\Field\Settings\FieldSettings |
36
|
|
|
*/ |
37
|
|
|
protected $defaultFieldSettings; |
38
|
|
|
|
39
|
|
|
public function __construct() |
40
|
|
|
{ |
41
|
|
|
$this->defaultFormSettings = new FormSettings; |
42
|
|
|
$this->defaultFieldSettings = new FieldSettings; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @return string |
47
|
|
|
*/ |
48
|
|
|
public function getDefaultBackendCache() |
49
|
|
|
{ |
50
|
|
|
return $this->defaultBackendCache; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @param string $defaultBackendCache |
55
|
|
|
*/ |
56
|
|
|
public function setDefaultBackendCache($defaultBackendCache) |
57
|
|
|
{ |
58
|
|
|
$this->defaultBackendCache = $defaultBackendCache; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @return FormSettings |
63
|
|
|
*/ |
64
|
|
|
public function getDefaultFormSettings() |
65
|
|
|
{ |
66
|
|
|
return $this->defaultFormSettings; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return FieldSettings |
71
|
|
|
*/ |
72
|
|
|
public function getDefaultFieldSettings() |
73
|
|
|
{ |
74
|
|
|
return $this->defaultFieldSettings; |
75
|
|
|
} |
76
|
|
|
} |
77
|
|
|
|