1 | <?php |
||
22 | class FormSettings extends AbstractFormzConfiguration |
||
23 | { |
||
24 | use ParentsTrait; |
||
25 | |||
26 | const DEFAULT_ERROR_MESSAGE_KEY = 'default_error_message'; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $defaultClass; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $defaultErrorMessage; |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getDefaultClass() |
||
45 | |||
46 | /** |
||
47 | * @param string $defaultClass |
||
48 | */ |
||
49 | public function setDefaultClass($defaultClass) |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getDefaultErrorMessage() |
||
63 | |||
64 | /** |
||
65 | * @param string $defaultErrorMessage |
||
66 | */ |
||
67 | public function setDefaultErrorMessage($defaultErrorMessage) |
||
71 | |||
72 | /** |
||
73 | * This function will do the following: first, it will check if the wanted |
||
74 | * property is set in this class instance (not null), then it returns it. If |
||
75 | * the value is null, it will fetch the global FormZ configuration settings, |
||
76 | * and return the default value for the asked property. |
||
77 | * |
||
78 | * Example: |
||
79 | * config.tx_formz.forms.My\Custom\Form.settings.defaultClass is null, then |
||
80 | * config.tx_formz.settings.defaultFormSettings.defaultClass is returned |
||
81 | * |
||
82 | * @param string $propertyName Name of the wanted class property. |
||
83 | * @return mixed|null |
||
84 | */ |
||
85 | private function getSettingsProperty($propertyName) |
||
104 | } |
||
105 |