Passed
Pull Request — master (#212)
by
unknown
24:14 queued 14:25
created
Configuration/TCA/tx_dpf_domain_model_metadataobject.php 1 patch
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     die('Access denied.');
17 17
 }
18 18
 
19
-return array(
20
-    'ctrl' => array(
19
+return array (
20
+    'ctrl' => array (
21 21
         'title'                    => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject',
22 22
         'label'                    => 'name',
23 23
         'tstamp'                   => 'tstamp',
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         'transOrigPointerField'    => 'l10n_parent',
29 29
         'transOrigDiffSourceField' => 'l10n_diffsource',
30 30
         'delete'                   => 'deleted',
31
-        'enablecolumns'            => array(
31
+        'enablecolumns'            => array (
32 32
             'disabled'  => 'hidden',
33 33
             'starttime' => 'starttime',
34 34
             'endtime'   => 'endtime',
@@ -36,75 +36,75 @@  discard block
 block discarded – undo
36 36
         'searchFields'             => 'name, display_name, max_iteration, mandatory, validator, validation, validation_error_message, mapping, mods_extension, json_mapping, input_field, deposit_license, max_input_length, input_option_list, fill_out_service, gnd_field_uid, default_value, access_restriction_roles, consent, embargo, fis_person_mapping, fis_organisation_mapping, gnd_person_mapping, gnd_organisation_mapping, ror_mapping, zdb_mapping, unpaywall_mapping, orcid_person_mapping, help_text, object_type',
37 37
         'iconfile'                 => 'EXT:dpf/Resources/Public/Icons/default.gif',
38 38
     ),
39
-    'interface' => array(
39
+    'interface' => array (
40 40
         'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, display_name, max_iteration, mandatory, validator, validation, validation_error_message, mapping, mods_extension, json_mapping, input_field, deposit_license, max_input_length, input_option_list, fill_out_service, gnd_field_uid, default_value, access_restriction_roles, consent, embargo, fis_person_mapping, fis_organisation_mapping, gnd_person_mapping, gnd_organisation_mapping, ror_mapping, zdb_mapping, unpaywall_mapping, orcid_person_mapping, help_text, object_type',
41 41
     ),
42
-    'types'     => array(
43
-        '1' => array('showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, --palette--;;1, name, display_name, max_iteration, mandatory, validator, validation, validation_error_message, mapping, mods_extension, json_mapping, input_field, deposit_license, max_input_length, input_option_list, fill_out_service, gnd_field_uid, default_value, access_restriction_roles, consent, embargo, fis_person_mapping, fis_organisation_mapping, gnd_person_mapping, gnd_organisation_mapping, ror_mapping, zdb_mapping, unpaywall_mapping, orcid_person_mapping, help_text, object_type, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'),
42
+    'types'     => array (
43
+        '1' => array ('showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, --palette--;;1, name, display_name, max_iteration, mandatory, validator, validation, validation_error_message, mapping, mods_extension, json_mapping, input_field, deposit_license, max_input_length, input_option_list, fill_out_service, gnd_field_uid, default_value, access_restriction_roles, consent, embargo, fis_person_mapping, fis_organisation_mapping, gnd_person_mapping, gnd_organisation_mapping, ror_mapping, zdb_mapping, unpaywall_mapping, orcid_person_mapping, help_text, object_type, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'),
44 44
     ),
45
-    'palettes'  => array(
46
-        '1' => array('showitem' => ''),
45
+    'palettes'  => array (
46
+        '1' => array ('showitem' => ''),
47 47
     ),
48
-    'columns'   => array(
48
+    'columns'   => array (
49 49
 
50
-        'sys_language_uid'  => array(
50
+        'sys_language_uid'  => array (
51 51
             'exclude' => 1,
52 52
             'label'   => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
53
-            'config'  => array(
53
+            'config'  => array (
54 54
                 'type'                => 'select',
55 55
                 'renderType'          => 'selectSingle',
56 56
                 'foreign_table'       => 'sys_language',
57 57
                 'foreign_table_where' => 'ORDER BY sys_language.title',
58
-                'items'               => array(
59
-                    array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
60
-                    array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0),
58
+                'items'               => array (
59
+                    array ('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
60
+                    array ('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0),
61 61
                 ),
62 62
                 'default' => 0,
63 63
             ),
64 64
         ),
65
-        'l10n_parent'       => array(
65
+        'l10n_parent'       => array (
66 66
             'displayCond' => 'FIELD:sys_language_uid:>:0',
67 67
             'exclude'     => 1,
68 68
             'label'       => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
69
-            'config'      => array(
69
+            'config'      => array (
70 70
                 'type'                => 'select',
71 71
                 'renderType'          => 'selectSingle',
72
-                'items'               => array(
73
-                    array('', 0),
72
+                'items'               => array (
73
+                    array ('', 0),
74 74
                 ),
75 75
                 'foreign_table'       => 'tx_dpf_domain_model_metadataobject',
76 76
                 'foreign_table_where' => 'AND tx_dpf_domain_model_metadataobject.pid=###CURRENT_PID### AND tx_dpf_domain_model_metadataobject.sys_language_uid IN (-1,0)',
77 77
                 'default' => 0,
78 78
             ),
79 79
         ),
80
-        'l10n_diffsource'   => array(
81
-            'config' => array(
80
+        'l10n_diffsource'   => array (
81
+            'config' => array (
82 82
                 'type' => 'passthrough',
83 83
             ),
84 84
         ),
85 85
 
86
-        't3ver_label'       => array(
86
+        't3ver_label'       => array (
87 87
             'label'  => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
88
-            'config' => array(
88
+            'config' => array (
89 89
                 'type' => 'input',
90 90
                 'size' => 30,
91 91
                 'max'  => 255,
92 92
             ),
93 93
         ),
94 94
 
95
-        'hidden'            => array(
95
+        'hidden'            => array (
96 96
             'exclude'   => 1,
97 97
             'l10n_mode' => 'exclude',
98 98
             'label'     => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
99
-            'config'    => array(
99
+            'config'    => array (
100 100
                 'type' => 'check',
101 101
             ),
102 102
         ),
103
-        'starttime'         => array(
103
+        'starttime'         => array (
104 104
             'exclude'   => 1,
105 105
             'label'     => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
106
-            'config'    => array(
107
-                'behaviour' => array(
106
+            'config'    => array (
107
+                'behaviour' => array (
108 108
                     'allowLanguageSynchronization' => true
109 109
                 ),
110 110
                 'type'     => 'input',
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
                 'eval'     => 'datetime',
114 114
                 'checkbox' => 0,
115 115
                 'default'  => 0,
116
-                'range'    => array(
116
+                'range'    => array (
117 117
                     'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')),
118 118
                 ),
119 119
             ),
120 120
         ),
121
-        'endtime'           => array(
121
+        'endtime'           => array (
122 122
             'exclude'   => 1,
123 123
             'label'     => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
124
-            'config'    => array(
125
-                'behaviour' => array(
124
+            'config'    => array (
125
+                'behaviour' => array (
126 126
                     'allowLanguageSynchronization' => true
127 127
                 ),
128 128
                 'type'     => 'input',
@@ -131,185 +131,185 @@  discard block
 block discarded – undo
131 131
                 'eval'     => 'datetime',
132 132
                 'checkbox' => 0,
133 133
                 'default'  => 0,
134
-                'range'    => array(
134
+                'range'    => array (
135 135
                     'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')),
136 136
                 ),
137 137
             ),
138 138
         ),
139 139
 
140
-        'name'              => array(
140
+        'name'              => array (
141 141
             'exclude'   => 1,
142 142
             'l10n_mode' => 'exclude',
143 143
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.name',
144
-            'config'    => array(
144
+            'config'    => array (
145 145
                 'type' => 'input',
146 146
                 'size' => 30,
147 147
                 'eval' => 'trim',
148 148
             ),
149 149
         ),
150
-        'display_name'      => array(
150
+        'display_name'      => array (
151 151
             'exclude' => 1,
152 152
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.display_name',
153
-            'config'  => array(
153
+            'config'  => array (
154 154
                 'type' => 'input',
155 155
                 'size' => 30,
156 156
                 'eval' => 'trim',
157 157
             ),
158 158
         ),
159
-        'max_iteration'     => array(
159
+        'max_iteration'     => array (
160 160
             'exclude'   => 1,
161 161
             'l10n_mode' => 'exclude',
162 162
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.max_iteration',
163
-            'config'    => array(
163
+            'config'    => array (
164 164
                 'type' => 'input',
165 165
                 'size' => 4,
166 166
                 'eval' => 'int',
167 167
             ),
168 168
         ),
169
-        'mandatory'         => array(
169
+        'mandatory'         => array (
170 170
             'exclude'   => 1,
171 171
             'l10n_mode' => 'exclude',
172 172
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mandatory',
173
-            'config'    => array(
173
+            'config'    => array (
174 174
                 'type' => 'select',
175 175
                 'renderType' => 'selectSingle',
176 176
                 'size' => 1,
177 177
                 'maxitems' => 1,
178
-                'items' => array(
179
-                    array('',''),
180
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mandatory_yes', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY),
181
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mandatory_file_only', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY_FILE_ONLY),
178
+                'items' => array (
179
+                    array ('', ''),
180
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mandatory_yes', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY),
181
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mandatory_file_only', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY_FILE_ONLY),
182 182
                 ),
183 183
             ),
184 184
         ),
185
-        'mapping'           => array(
185
+        'mapping'           => array (
186 186
             'exclude'   => 1,
187 187
             'l10n_mode' => 'exclude',
188 188
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mapping',
189
-            'config'    => array(
189
+            'config'    => array (
190 190
                 'type' => 'input',
191 191
                 'size' => 30,
192 192
                 'eval' => 'trim',
193 193
             ),
194 194
         ),
195
-        'json_mapping'           => array(
195
+        'json_mapping'           => array (
196 196
             'exclude'   => 1,
197 197
             'l10n_mode' => 'exclude',
198 198
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.json_mapping',
199
-            'config'    => array(
199
+            'config'    => array (
200 200
                 'type' => 'input',
201 201
                 'size' => 30,
202 202
                 'eval' => 'trim',
203 203
             ),
204 204
         ),
205
-        'validator'         => array(
205
+        'validator'         => array (
206 206
             'exclude'   => 1,
207 207
             'l10n_mode' => 'exclude',
208 208
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validator',
209
-            'config'    => array(
209
+            'config'    => array (
210 210
                 'type'     => 'select',
211 211
                 'renderType' => 'selectSingle',
212
-                'items'    => array(
213
-                    array('', ''),
214
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validator.regexp', \EWW\Dpf\Domain\Model\MetadataObject::VALIDATOR_REGEXP),
215
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validator.date', \EWW\Dpf\Domain\Model\MetadataObject::VALIDATOR_DATE),
212
+                'items'    => array (
213
+                    array ('', ''),
214
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validator.regexp', \EWW\Dpf\Domain\Model\MetadataObject::VALIDATOR_REGEXP),
215
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validator.date', \EWW\Dpf\Domain\Model\MetadataObject::VALIDATOR_DATE),
216 216
                 ),
217 217
                 'size'     => 1,
218 218
                 'maxitems' => 1,
219 219
                 'eval'     => '',
220 220
             ),
221 221
         ),
222
-        'validation'        => array(
222
+        'validation'        => array (
223 223
             'exclude'   => 1,
224 224
             'l10n_mode' => 'exclude',
225 225
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validation',
226
-            'config'    => array(
226
+            'config'    => array (
227 227
                 'type' => 'input',
228 228
                 'size' => 30,
229 229
                 'eval' => 'trim',
230 230
             ),
231 231
         ),
232
-        'validation_error_message'        => array(
232
+        'validation_error_message'        => array (
233 233
             'exclude'   => 1,
234 234
             'l10n_mode' => 'exclude',
235 235
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.validation_error_message',
236
-            'config'    => array(
236
+            'config'    => array (
237 237
                 'type' => 'input',
238 238
                 'size' => 30,
239 239
                 'eval' => 'trim',
240 240
             ),
241 241
         ),
242
-        'mods_extension'    => array(
242
+        'mods_extension'    => array (
243 243
             'exclude'   => 1,
244 244
             'l10n_mode' => 'exclude',
245 245
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.mods_extension',
246
-            'config'    => array(
246
+            'config'    => array (
247 247
                 'type'    => 'check',
248 248
                 'default' => 0,
249 249
             ),
250 250
         ),
251
-        'access_restriction_roles' => array(
251
+        'access_restriction_roles' => array (
252 252
             'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.access_restriction_roles',
253
-            'config' => array(
253
+            'config' => array (
254 254
                 'type' => 'select',
255 255
                 'renderType' => 'selectMultipleSideBySide',
256 256
                 'size' => 2,
257 257
                 'maxitems' => 2,
258
-                'items' => array(
259
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_researcher', EWW\Dpf\Security\Security::ROLE_RESEARCHER),
260
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_librarian', EWW\Dpf\Security\Security::ROLE_LIBRARIAN),
258
+                'items' => array (
259
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_researcher', EWW\Dpf\Security\Security::ROLE_RESEARCHER),
260
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_librarian', EWW\Dpf\Security\Security::ROLE_LIBRARIAN),
261 261
                 ),
262 262
             ),
263 263
         ),
264
-        'consent'           => array(
264
+        'consent'           => array (
265 265
             'exclude'   => 1,
266 266
             'l10n_mode' => 'exclude',
267 267
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.consent',
268
-            'config'    => array(
268
+            'config'    => array (
269 269
                 'type'    => 'check',
270 270
                 'default' => 0,
271 271
             ),
272 272
         ),
273
-        'input_field'       => array(
273
+        'input_field'       => array (
274 274
             'onChange' => 'reload',
275 275
             'exclude'   => 1,
276 276
             'l10n_mode' => 'exclude',
277 277
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_field',
278
-            'config'    => array(
278
+            'config'    => array (
279 279
                 'onChange' => 'reload',
280 280
                 'type'     => 'select',
281 281
                 'renderType' => 'selectSingle',
282
-                'items'    => array(
283
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.input', \EWW\Dpf\Domain\Model\MetadataObject::input),
284
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.textarea', \EWW\Dpf\Domain\Model\MetadataObject::textarea),
285
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.select', \EWW\Dpf\Domain\Model\MetadataObject::select),
286
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.checkbox', \EWW\Dpf\Domain\Model\MetadataObject::checkbox),
287
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.hidden', \EWW\Dpf\Domain\Model\MetadataObject::hidden),
288
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.inputDropdown', \EWW\Dpf\Domain\Model\MetadataObject::INPUTDROPDOWN),
289
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.markdownTextarea', \EWW\Dpf\Domain\Model\MetadataObject::textareaMarkdown),
290
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.fileUpload', \EWW\Dpf\Domain\Model\MetadataObject::FILE_UPLOAD)
282
+                'items'    => array (
283
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.input', \EWW\Dpf\Domain\Model\MetadataObject::input),
284
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.textarea', \EWW\Dpf\Domain\Model\MetadataObject::textarea),
285
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.select', \EWW\Dpf\Domain\Model\MetadataObject::select),
286
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.checkbox', \EWW\Dpf\Domain\Model\MetadataObject::checkbox),
287
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.hidden', \EWW\Dpf\Domain\Model\MetadataObject::hidden),
288
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.inputDropdown', \EWW\Dpf\Domain\Model\MetadataObject::INPUTDROPDOWN),
289
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.markdownTextarea', \EWW\Dpf\Domain\Model\MetadataObject::textareaMarkdown),
290
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_type.fileUpload', \EWW\Dpf\Domain\Model\MetadataObject::FILE_UPLOAD)
291 291
                 ),
292 292
                 'size'     => 1,
293 293
                 'maxitems' => 1,
294 294
                 'eval'     => '',
295 295
             ),
296 296
         ),
297
-        'deposit_license'       => array(
298
-            'displayCond' => array(
299
-                'OR' => array(
297
+        'deposit_license'       => array (
298
+            'displayCond' => array (
299
+                'OR' => array (
300 300
                     'FIELD:input_field:REQ:false',
301
-                    'FIELD:input_field:=:'.\EWW\Dpf\Domain\Model\MetadataObject::checkbox,
301
+                    'FIELD:input_field:=:' . \EWW\Dpf\Domain\Model\MetadataObject::checkbox,
302 302
                 ),
303 303
             ),
304 304
             'exclude'   => 1,
305 305
             'l10n_mode' => 'exclude',
306 306
             'label'     => 'Checkbox Value',
307
-            'config'    => array(
307
+            'config'    => array (
308 308
                 'type'     => 'select',
309 309
                 'renderType' => 'selectSingle',
310 310
                 'foreign_table' => 'tx_dpf_domain_model_depositlicense',
311
-                'items'    => array(
312
-                    array('', 0),
311
+                'items'    => array (
312
+                    array ('', 0),
313 313
                 ),
314 314
                 'size'     => 1,
315 315
                 'maxitems' => 1,
@@ -317,32 +317,32 @@  discard block
 block discarded – undo
317 317
                 'default'  => 0,
318 318
             ),
319 319
         ),
320
-        'max_input_length'       => array(
321
-            'displayCond' => array(
322
-                'OR' => array(
320
+        'max_input_length'       => array (
321
+            'displayCond' => array (
322
+                'OR' => array (
323 323
                     'FIELD:input_field:REQ:false',
324
-                    'FIELD:input_field:=:'.\EWW\Dpf\Domain\Model\MetadataObject::input,
325
-                    'FIELD:input_field:=:'.\EWW\Dpf\Domain\Model\MetadataObject::textarea,
324
+                    'FIELD:input_field:=:' . \EWW\Dpf\Domain\Model\MetadataObject::input,
325
+                    'FIELD:input_field:=:' . \EWW\Dpf\Domain\Model\MetadataObject::textarea,
326 326
                 ),
327 327
             ),
328 328
             'exclude'   => 1,
329 329
             'l10n_mode' => 'exclude',
330 330
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.max_input_length',
331
-            'config'    => array(
331
+            'config'    => array (
332 332
                 'type' => 'input',
333 333
                 'size' => 4,
334 334
                 'eval' => 'trim,number',
335 335
                 'default' => 0,
336 336
             ),
337 337
         ),
338
-        'input_option_list' => array(
338
+        'input_option_list' => array (
339 339
             'exclude' => 1,
340 340
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.input_option_list',
341
-            'config'  => array(
341
+            'config'  => array (
342 342
                 'type'                => 'select',
343 343
                 'renderType'          => 'selectSingle',
344
-                'items'               => array(
345
-                    array('', 0),
344
+                'items'               => array (
345
+                    array ('', 0),
346 346
                 ),
347 347
                 'foreign_table'       => 'tx_dpf_domain_model_inputoptionlist',
348 348
                 'foreign_table_where' => ' AND (tx_dpf_domain_model_inputoptionlist.pid=###CURRENT_PID###) AND (tx_dpf_domain_model_inputoptionlist.sys_language_uid = 0)',
@@ -351,27 +351,27 @@  discard block
 block discarded – undo
351 351
                 'default'             => 0,
352 352
             ),
353 353
         ),
354
-        'default_value'     => array(
354
+        'default_value'     => array (
355 355
             'exclude' => 1,
356 356
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.default_value',
357
-            'config'  => array(
357
+            'config'  => array (
358 358
                 'type' => 'text',
359 359
                 'cols' => 20,
360 360
                 'rows' => 3,
361 361
                 'eval' => 'trim',
362 362
             ),
363 363
         ),
364
-        'fill_out_service'  => array(
364
+        'fill_out_service'  => array (
365 365
             'exclude'   => 1,
366 366
             'l10n_mode' => 'exclude',
367 367
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.fill_out_service',
368
-            'config'    => array(
368
+            'config'    => array (
369 369
                 'type'     => 'select',
370 370
                 'renderType' => 'selectSingle',
371
-                'items'    => array(
372
-                    array('', 0),
373
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.fill_out_service.urn', \EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_URN),
374
-                    array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.fill_out_service.gnd', \EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_GND),
371
+                'items'    => array (
372
+                    array ('', 0),
373
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.fill_out_service.urn', \EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_URN),
374
+                    array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.fill_out_service.gnd', \EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_GND),
375 375
                 ),
376 376
                 'size'     => 1,
377 377
                 'maxitems' => 1,
@@ -379,26 +379,26 @@  discard block
 block discarded – undo
379 379
             ),
380 380
             'onChange' => 'reload',
381 381
         ),
382
-        'gnd_field_uid' => array(
383
-            'displayCond' => 'FIELD:fill_out_service:=:'.\EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_GND,
382
+        'gnd_field_uid' => array (
383
+            'displayCond' => 'FIELD:fill_out_service:=:' . \EWW\Dpf\Domain\Model\MetadataObject::FILL_OUT_SERVICE_GND,
384 384
             'exclude'   => 0,
385 385
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.gnd_field_uid',
386
-            'config'  => array(
386
+            'config'  => array (
387 387
                 'type' => 'input',
388 388
                 'size' => 30,
389 389
                 'eval' => 'trim',
390 390
             ),
391 391
         ),
392
-        'metadatagroup'     => array(
393
-            'config' => array(
392
+        'metadatagroup'     => array (
393
+            'config' => array (
394 394
                 'type' => 'passthrough',
395 395
             ),
396 396
         ),
397
-        'embargo'    => array(
397
+        'embargo'    => array (
398 398
             'exclude'   => 1,
399 399
             'l10n_mode' => 'exclude',
400 400
             'label'     => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.embargo',
401
-            'config'    => array(
401
+            'config'    => array (
402 402
                 'type'    => 'check',
403 403
                 'default' => 0,
404 404
             ),
@@ -483,10 +483,10 @@  discard block
 block discarded – undo
483 483
                 ],
484 484
             ],
485 485
         ],
486
-        'help_text'                => array(
486
+        'help_text'                => array (
487 487
             'exclude' => 1,
488 488
             'label'   => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadataobject.help_text',
489
-            'config'  => array(
489
+            'config'  => array (
490 490
                 'type' => 'text',
491 491
                 'cols' => 40,
492 492
                 'rows' => 15,
Please login to merge, or discard this patch.
class.ext_update.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
             }
147 147
         }
148 148
 
149
-       // $GLOBALS['TYPO3_DB']->sql_query("ALTER TABLE tx_dpf_domain_model_documenttype CHANGE virtual zzz_deleted_virtual SMALLINT UNSIGNED DEFAULT 0 NOT NULL");
149
+        // $GLOBALS['TYPO3_DB']->sql_query("ALTER TABLE tx_dpf_domain_model_documenttype CHANGE virtual zzz_deleted_virtual SMALLINT UNSIGNED DEFAULT 0 NOT NULL");
150 150
 
151 151
     }
152 152
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function access() {
35 35
         $registry = GeneralUtility::makeInstance(Registry::class);
36
-        $version = $registry->get('tx_dpf','updatescript-'.self::NEW_VERSION);
36
+        $version = $registry->get('tx_dpf', 'updatescript-' . self::NEW_VERSION);
37 37
         // If the version has already been registered in the table sys_register the updatscript will be blocked.
38 38
         if ($version) {
39 39
             return FALSE;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function main() {
46 46
         // This script registers itself into the sys_registry table to prevent a re-run with the same version number.
47 47
         $registry = GeneralUtility::makeInstance(Registry::class);
48
-        $newVersion = $registry->get('tx_dpf','updatescript-'.self::NEW_VERSION);
48
+        $newVersion = $registry->get('tx_dpf', 'updatescript-' . self::NEW_VERSION);
49 49
 
50 50
         if ($newVersion) {
51 51
             return FALSE;
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
                 // 3->4: (new UpdateVirtualType)->execute();
58 58
                 (new UpdateMetadataObjectValidator)->execute();
59 59
             } catch (\Throwable $throwable) {
60
-                return "Error while updating the extension: ".($throwable->getMessage());
60
+                return "Error while updating the extension: " . ($throwable->getMessage());
61 61
             }
62
-            $registry->set('tx_dpf','updatescript-'.self::NEW_VERSION, TRUE);
62
+            $registry->set('tx_dpf', 'updatescript-' . self::NEW_VERSION, TRUE);
63 63
             return "The extension has been successfully updated.";
64 64
         }
65 65
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             foreach ($repository->crossClientFindAll() as $record) {
124 124
                 if ($record['backend_only']) {
125 125
                     $recordObject = $repository->findByUid($record['uid']);
126
-                    $recordObject->setAccessRestrictionRoles(array(Security::ROLE_LIBRARIAN, Security::ROLE_RESEARCHER));
126
+                    $recordObject->setAccessRestrictionRoles(array (Security::ROLE_LIBRARIAN, Security::ROLE_RESEARCHER));
127 127
                     $repository->update($recordObject);
128 128
                 }
129 129
             }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,16 +66,14 @@  discard block
 block discarded – undo
66 66
 }
67 67
 
68 68
 
69
-class UpdateState
70
-{
69
+class UpdateState {
71 70
     const OBJECT_STATE_NEW             = "NEW";
72 71
     const OBJECT_STATE_ACTIVE          = "ACTIVE";
73 72
     const OBJECT_STATE_INACTIVE        = "INACTIVE";
74 73
     const OBJECT_STATE_DELETED         = "DELETED";
75 74
     const OBJECT_STATE_LOCALLY_DELETED = "LOCALLY_DELETED";
76 75
 
77
-    public function execute()
78
-    {
76
+    public function execute() {
79 77
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
80 78
         $documentRepository = $objectManager->get(DocumentRepository::class);
81 79
 
@@ -110,8 +108,7 @@  discard block
 block discarded – undo
110 108
     }
111 109
 }
112 110
 
113
-class UpdateAccessRestrictions
114
-{
111
+class UpdateAccessRestrictions {
115 112
     public function execute() {
116 113
 
117 114
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
@@ -131,8 +128,7 @@  discard block
 block discarded – undo
131 128
     }
132 129
 }
133 130
 
134
-class UpdateVirtualType
135
-{
131
+class UpdateVirtualType {
136 132
     public function execute() {
137 133
 
138 134
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
@@ -151,8 +147,7 @@  discard block
 block discarded – undo
151 147
     }
152 148
 }
153 149
 
154
-class UpdateMetadataObjectValidator
155
-{
150
+class UpdateMetadataObjectValidator {
156 151
     public function execute() {
157 152
 
158 153
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
Please login to merge, or discard this patch.
Classes/Domain/Model/MetadataObject.php 1 patch
Braces   +42 added lines, -84 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * MetadataObject
19 19
  */
20
-class MetadataObject extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface
21
-{
20
+class MetadataObject extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface {
22 21
 
23 22
     /**
24 23
      * name
@@ -241,8 +240,7 @@  discard block
 block discarded – undo
241 240
      *
242 241
      * @return string $name
243 242
      */
244
-    public function getName()
245
-    {
243
+    public function getName() {
246 244
         return $this->name;
247 245
     }
248 246
 
@@ -252,8 +250,7 @@  discard block
 block discarded – undo
252 250
      * @param string $name
253 251
      * @return void
254 252
      */
255
-    public function setName($name)
256
-    {
253
+    public function setName($name) {
257 254
         $this->name = $name;
258 255
     }
259 256
 
@@ -262,8 +259,7 @@  discard block
 block discarded – undo
262 259
      *
263 260
      * @return string $displayName
264 261
      */
265
-    public function getDisplayName()
266
-    {
262
+    public function getDisplayName() {
267 263
         return $this->displayName;
268 264
     }
269 265
 
@@ -273,8 +269,7 @@  discard block
 block discarded – undo
273 269
      * @param string $displayName
274 270
      * @return void
275 271
      */
276
-    public function setDisplayName($displayName)
277
-    {
272
+    public function setDisplayName($displayName) {
278 273
         $this->displayName = $displayName;
279 274
     }
280 275
 
@@ -283,8 +278,7 @@  discard block
 block discarded – undo
283 278
      *
284 279
      * @return integer $maxIteration
285 280
      */
286
-    public function getMaxIteration()
287
-    {
281
+    public function getMaxIteration() {
288 282
         if ($this->isRepeatable()) {
289 283
             return $this->maxIteration;
290 284
         }
@@ -297,8 +291,7 @@  discard block
 block discarded – undo
297 291
      * @param integer $maxIteration
298 292
      * @return void
299 293
      */
300
-    public function setMaxIteration($maxIteration)
301
-    {
294
+    public function setMaxIteration($maxIteration) {
302 295
         if ($this->isRepeatable()) {
303 296
             $this->maxIteration = $maxIteration;
304 297
         } else {
@@ -311,8 +304,7 @@  discard block
 block discarded – undo
311 304
      *
312 305
      * @return string $mandatory
313 306
      */
314
-    public function getMandatory()
315
-    {
307
+    public function getMandatory() {
316 308
         return $this->mandatory;
317 309
     }
318 310
 
@@ -322,8 +314,7 @@  discard block
 block discarded – undo
322 314
      * @param string $mandatory
323 315
      * @return void
324 316
      */
325
-    public function setMandatory($mandatory)
326
-    {
317
+    public function setMandatory($mandatory) {
327 318
         $this->mandatory = $mandatory;
328 319
     }
329 320
 
@@ -332,8 +323,7 @@  discard block
 block discarded – undo
332 323
      *
333 324
      * @return boolean $modsExtension
334 325
      */
335
-    public function getModsExtension()
336
-    {
326
+    public function getModsExtension() {
337 327
         return $this->modsExtension;
338 328
     }
339 329
 
@@ -343,8 +333,7 @@  discard block
 block discarded – undo
343 333
      * @param boolean $modsExtension
344 334
      * @return void
345 335
      */
346
-    public function setModsExtension($modsExtension)
347
-    {
336
+    public function setModsExtension($modsExtension) {
348 337
         $this->modsExtension = boolval($modsExtension);
349 338
     }
350 339
 
@@ -353,8 +342,7 @@  discard block
 block discarded – undo
353 342
      *
354 343
      * @return boolean
355 344
      */
356
-    public function isModsExtension()
357
-    {
345
+    public function isModsExtension() {
358 346
         return $this->modsExtension;
359 347
     }
360 348
 
@@ -363,8 +351,7 @@  discard block
 block discarded – undo
363 351
      *
364 352
      * @return string $mapping
365 353
      */
366
-    public function getMapping()
367
-    {
354
+    public function getMapping() {
368 355
         return $this->mapping;
369 356
     }
370 357
 
@@ -374,8 +361,7 @@  discard block
 block discarded – undo
374 361
      * @param string $mapping
375 362
      * @return void
376 363
      */
377
-    public function setMapping($mapping)
378
-    {
364
+    public function setMapping($mapping) {
379 365
         $this->mapping = $mapping;
380 366
     }
381 367
 
@@ -384,8 +370,7 @@  discard block
 block discarded – undo
384 370
      *
385 371
      * @return string $relativeMapping
386 372
      */
387
-    public function getRelativeMapping()
388
-    {
373
+    public function getRelativeMapping() {
389 374
         return trim($this->mapping, " /");
390 375
     }
391 376
 
@@ -394,8 +379,7 @@  discard block
 block discarded – undo
394 379
      *
395 380
      * @return integer $inputField
396 381
      */
397
-    public function getInputField()
398
-    {
382
+    public function getInputField() {
399 383
         return $this->inputField;
400 384
     }
401 385
 
@@ -405,8 +389,7 @@  discard block
 block discarded – undo
405 389
      * @param integer $inputField
406 390
      * @return void
407 391
      */
408
-    public function setInputField($inputField)
409
-    {
392
+    public function setInputField($inputField) {
410 393
         $this->inputField = $inputField;
411 394
     }
412 395
 
@@ -415,8 +398,7 @@  discard block
 block discarded – undo
415 398
      *
416 399
      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject
417 400
      */
418
-    public function getChildren()
419
-    {
401
+    public function getChildren() {
420 402
         return null;
421 403
     }
422 404
 
@@ -425,8 +407,7 @@  discard block
 block discarded – undo
425 407
      *
426 408
      * @return \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
427 409
      */
428
-    public function getInputOptionList()
429
-    {
410
+    public function getInputOptionList() {
430 411
         return $this->inputOptionList;
431 412
     }
432 413
 
@@ -436,8 +417,7 @@  discard block
 block discarded – undo
436 417
      * @param \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
437 418
      * @return void
438 419
      */
439
-    public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList)
440
-    {
420
+    public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList) {
441 421
         $this->inputOptionList = $inputOptionList;
442 422
     }
443 423
 
@@ -446,8 +426,7 @@  discard block
 block discarded – undo
446 426
      *
447 427
      * @return string $fillOutService
448 428
      */
449
-    public function getFillOutService()
450
-    {
429
+    public function getFillOutService() {
451 430
         return $this->fillOutService;
452 431
     }
453 432
 
@@ -457,8 +436,7 @@  discard block
 block discarded – undo
457 436
      * @param string $fillOutService
458 437
      * @return void
459 438
      */
460
-    public function setFillOutService($fillOutService)
461
-    {
439
+    public function setFillOutService($fillOutService) {
462 440
         $this->fillOutService = $fillOutService;
463 441
     }
464 442
 
@@ -467,8 +445,7 @@  discard block
 block discarded – undo
467 445
      *
468 446
      * @return array $accessRestrictionRoles
469 447
      */
470
-    public function getAccessRestrictionRoles()
471
-    {
448
+    public function getAccessRestrictionRoles() {
472 449
         if ($this->accessRestrictionRoles) {
473 450
             return array_map('trim', explode(',', $this->accessRestrictionRoles));
474 451
         } else {
@@ -482,8 +459,7 @@  discard block
 block discarded – undo
482 459
      * @param array $accessRestrictionRoles
483 460
      * @return void
484 461
      */
485
-    public function setAccessRestrictionRoles($accessRestrictionRoles)
486
-    {
462
+    public function setAccessRestrictionRoles($accessRestrictionRoles) {
487 463
         $this->accessRestrictionRoles = implode(',', $accessRestrictionRoles);
488 464
     }
489 465
 
@@ -492,8 +468,7 @@  discard block
 block discarded – undo
492 468
      *
493 469
      * @return boolean $consent
494 470
      */
495
-    public function getConsent()
496
-    {
471
+    public function getConsent() {
497 472
         return $this->consent;
498 473
     }
499 474
 
@@ -503,8 +478,7 @@  discard block
 block discarded – undo
503 478
      * @param boolean $consent
504 479
      * @return void
505 480
      */
506
-    public function setConsent($consent)
507
-    {
481
+    public function setConsent($consent) {
508 482
         $this->consent = boolval($consent);
509 483
     }
510 484
 
@@ -513,8 +487,7 @@  discard block
 block discarded – undo
513 487
      *
514 488
      * @return string $defaultValue
515 489
      */
516
-    public function getDefaultValue()
517
-    {
490
+    public function getDefaultValue() {
518 491
         return $this->defaultValue;
519 492
     }
520 493
 
@@ -524,8 +497,7 @@  discard block
 block discarded – undo
524 497
      * @param string $defaultValue
525 498
      * @return void
526 499
      */
527
-    public function setDefaultValue($defaultValue)
528
-    {
500
+    public function setDefaultValue($defaultValue) {
529 501
         $this->defaultValue = $defaultValue;
530 502
     }
531 503
 
@@ -534,8 +506,7 @@  discard block
 block discarded – undo
534 506
      *
535 507
      * @return string $validation
536 508
      */
537
-    public function getValidation()
538
-    {
509
+    public function getValidation() {
539 510
         return $this->validation;
540 511
     }
541 512
 
@@ -545,8 +516,7 @@  discard block
 block discarded – undo
545 516
      * @param string $validation
546 517
      * @return void
547 518
      */
548
-    public function setValidation($validation)
549
-    {
519
+    public function setValidation($validation) {
550 520
         $this->validation = $validation;
551 521
     }
552 522
 
@@ -571,8 +541,7 @@  discard block
 block discarded – undo
571 541
      *
572 542
      * @return string $validator
573 543
      */
574
-    public function getValidator()
575
-    {
544
+    public function getValidator() {
576 545
         return $this->validator;
577 546
     }
578 547
 
@@ -582,32 +551,28 @@  discard block
 block discarded – undo
582 551
      * @param string $validator
583 552
      * @return void
584 553
      */
585
-    public function setValidator($validator)
586
-    {
554
+    public function setValidator($validator) {
587 555
         $this->validator = $validator;
588 556
     }
589 557
 
590 558
     /**
591 559
      * @return string
592 560
      */
593
-    public function getGndFieldUid()
594
-    {
561
+    public function getGndFieldUid() {
595 562
         return $this->gndFieldUid;
596 563
     }
597 564
 
598 565
     /**
599 566
      * @param string $gndFieldUid
600 567
      */
601
-    public function setGndFieldUid($gndFieldUid)
602
-    {
568
+    public function setGndFieldUid($gndFieldUid) {
603 569
         $this->gndFieldUid = $gndFieldUid;
604 570
     }
605 571
 
606 572
     /**
607 573
      * @return integer
608 574
      */
609
-    public function getMaxInputLength()
610
-    {
575
+    public function getMaxInputLength() {
611 576
         if ($this->maxInputLength == 0) {
612 577
             if ($this->inputField == self::input) {
613 578
                 return 255;
@@ -622,8 +587,7 @@  discard block
 block discarded – undo
622 587
     /**
623 588
      * @return integer
624 589
      */
625
-    public function setMaxInputLength($maxInputLength)
626
-    {
590
+    public function setMaxInputLength($maxInputLength) {
627 591
         $this->maxInputLength = $maxInputLength;
628 592
     }
629 593
 
@@ -638,8 +602,7 @@  discard block
 block discarded – undo
638 602
     /**
639 603
      * @param bool $embargo
640 604
      */
641
-    public function setEmbargo(bool $embargo)
642
-    {
605
+    public function setEmbargo(bool $embargo) {
643 606
         $this->embargo = boolval($embargo);
644 607
     }
645 608
 
@@ -686,8 +649,7 @@  discard block
 block discarded – undo
686 649
     /**
687 650
      * @param string $rorMapping
688 651
      */
689
-    public function setRorMapping(string $rorMapping)
690
-    {
652
+    public function setRorMapping(string $rorMapping) {
691 653
         $this->rorMapping = $rorMapping;
692 654
     }
693 655
 
@@ -841,32 +803,28 @@  discard block
 block discarded – undo
841 803
     /**
842 804
      * @return bool
843 805
      */
844
-    public function isUploadField()
845
-    {
806
+    public function isUploadField() {
846 807
         return $this->getInputField() == self::FILE_UPLOAD;
847 808
     }
848 809
 
849 810
     /**
850 811
      * @return bool
851 812
      */
852
-    public function isFileLabelField()
853
-    {
813
+    public function isFileLabelField() {
854 814
         return $this->getObjectType() == 'fileLabel';
855 815
     }
856 816
 
857 817
     /**
858 818
      * @return bool
859 819
      */
860
-    public function isFileDownloadField()
861
-    {
820
+    public function isFileDownloadField() {
862 821
         return $this->getObjectType() == 'fileDownload';
863 822
     }
864 823
 
865 824
     /**
866 825
      * @return bool
867 826
      */
868
-    public function isFileArchiveField()
869
-    {
827
+    public function isFileArchiveField() {
870 828
         return $this->getObjectType() == 'fileArchive';
871 829
     }
872 830
 
Please login to merge, or discard this patch.
Classes/Domain/Model/DocumentFormField.php 1 patch
Braces   +20 added lines, -40 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class DocumentFormField extends AbstractFormElement
18
-{
17
+class DocumentFormField extends AbstractFormElement {
19 18
     protected $file;
20 19
 
21 20
     protected $value;
@@ -75,13 +74,11 @@  discard block
 block discarded – undo
75 74
      */
76 75
     protected $objectType = '';
77 76
 
78
-    public function getValue()
79
-    {
77
+    public function getValue() {
80 78
         return $this->value;
81 79
     }
82 80
 
83
-    public function setValue($value, $defaultValue = '')
84
-    {
81
+    public function setValue($value, $defaultValue = '') {
85 82
 
86 83
         $this->hasDefaultValue = !empty($defaultValue);
87 84
 
@@ -112,13 +109,11 @@  discard block
 block discarded – undo
112 109
         }
113 110
     }
114 111
 
115
-    public function getInputField()
116
-    {
112
+    public function getInputField() {
117 113
         return $this->inputField;
118 114
     }
119 115
 
120
-    public function setInputField($inputField)
121
-    {
116
+    public function setInputField($inputField) {
122 117
         $this->inputField = $inputField;
123 118
     }
124 119
 
@@ -126,8 +121,7 @@  discard block
 block discarded – undo
126 121
      *
127 122
      * @return array
128 123
      */
129
-    public function getInputOptions()
130
-    {
124
+    public function getInputOptions() {
131 125
         return $this->inputOptions;
132 126
     }
133 127
 
@@ -135,8 +129,7 @@  discard block
 block discarded – undo
135 129
      *
136 130
      * @param \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList
137 131
      */
138
-    public function setInputOptions(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList = null)
139
-    {
132
+    public function setInputOptions(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList = null) {
140 133
 
141 134
         $this->inputOptions = array();
142 135
 
@@ -156,8 +149,7 @@  discard block
 block discarded – undo
156 149
      *
157 150
      * @return string $fillOutService
158 151
      */
159
-    public function getFillOutService()
160
-    {
152
+    public function getFillOutService() {
161 153
         return $this->fillOutService;
162 154
     }
163 155
 
@@ -167,8 +159,7 @@  discard block
 block discarded – undo
167 159
      * @param string $fillOutService
168 160
      * @return void
169 161
      */
170
-    public function setFillOutService($fillOutService)
171
-    {
162
+    public function setFillOutService($fillOutService) {
172 163
         $this->fillOutService = $fillOutService;
173 164
     }
174 165
 
@@ -177,8 +168,7 @@  discard block
 block discarded – undo
177 168
      *
178 169
      * @return boolean $consent
179 170
      */
180
-    public function getConsent()
181
-    {
171
+    public function getConsent() {
182 172
         return $this->consent;
183 173
     }
184 174
 
@@ -188,23 +178,19 @@  discard block
 block discarded – undo
188 178
      * @param boolean $consent
189 179
      * @return void
190 180
      */
191
-    public function setConsent($consent)
192
-    {
181
+    public function setConsent($consent) {
193 182
         $this->consent = boolval($consent);
194 183
     }
195 184
 
196
-    public function getHasDefaultValue()
197
-    {
185
+    public function getHasDefaultValue() {
198 186
         return $this->hasDefaultValue;
199 187
     }
200 188
 
201
-    public function getValidation()
202
-    {
189
+    public function getValidation() {
203 190
         return $this->validation;
204 191
     }
205 192
 
206
-    public function setValidation($validation)
207
-    {
193
+    public function setValidation($validation) {
208 194
         $this->validation = $validation;
209 195
     }
210 196
 
@@ -213,8 +199,7 @@  discard block
 block discarded – undo
213 199
      *
214 200
      * @return string
215 201
      */
216
-    public function getValidator()
217
-    {
202
+    public function getValidator() {
218 203
         return $this->validator;
219 204
     }
220 205
 
@@ -224,8 +209,7 @@  discard block
 block discarded – undo
224 209
      * @param string $validator
225 210
      * @return void
226 211
      */
227
-    public function setValidator($validator)
228
-    {
212
+    public function setValidator($validator) {
229 213
         $this->validator = $validator;
230 214
     }
231 215
 
@@ -287,8 +271,7 @@  discard block
 block discarded – undo
287 271
     /**
288 272
      * @return mixed
289 273
      */
290
-    public function getDepositLicense()
291
-    {
274
+    public function getDepositLicense() {
292 275
         return $this->depositLicense;
293 276
     }
294 277
 
@@ -316,8 +299,7 @@  discard block
 block discarded – undo
316 299
         $this->helpText = $helpText;
317 300
     }
318 301
 
319
-    public function getHelpTextLong()
320
-    {
302
+    public function getHelpTextLong() {
321 303
         if ($this->helpText) {
322 304
             $domDocument = new \DOMDocument();
323 305
             $domDocument->loadXML("<html>".$this->helpText."</html>");
@@ -330,8 +312,7 @@  discard block
 block discarded – undo
330 312
         }
331 313
     }
332 314
 
333
-    public function getHelpTextShort()
334
-    {
315
+    public function getHelpTextShort() {
335 316
         if ($this->helpText) {
336 317
             $domDocument = new \DOMDocument();
337 318
             $domDocument->loadXML("<html>" . $this->helpText . "</html>");
@@ -346,8 +327,7 @@  discard block
 block discarded – undo
346 327
     /**
347 328
      * @return mixed
348 329
      */
349
-    public function getFile()
350
-    {
330
+    public function getFile() {
351 331
         return $this->file;
352 332
     }
353 333
 
Please login to merge, or discard this patch.
ext_localconf.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
     require_once $composerAutoloadFile;
23 23
 }
24 24
 
25
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array(
25
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\TransferTask'] = array (
26 26
     'extension'   => $_EXTKEY,
27 27
     'title'       => 'Kitodo.Publication-Dokumente ans Repository ĂĽbertragen.',
28 28
     'description' => '',
29 29
 );
30 30
 
31
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\EmbargoTask'] = array(
31
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['EWW\Dpf\Tasks\EmbargoTask'] = array (
32 32
     'extension' => $_EXTKEY,
33 33
     'title' => 'Kitodo.Publication Embargo Task',
34 34
     'description' => 'Embargo task for sending information to admins or publish files automatically if the embargo date is expired',
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
38 38
     'EWW.' . $_EXTKEY,
39 39
     'KitodoPublicationForm',
40
-    array(
40
+    array (
41 41
         'DocumentForm'     => 'list,new,create,edit,update,delete,cancel',
42 42
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut,remoteFileExists',
43 43
         'Gnd'              => 'search',
44 44
     ),
45 45
     // non-cacheable actions
46
-    array(
46
+    array (
47 47
         'DocumentForm'     => 'list,new,create,edit,update,delete,cancel,ajaxGroup,ajaxFileGroup,ajaxField',
48 48
         'AjaxDocumentForm' => 'group,fileGroup,field,deleteFile,primaryUpload,secondaryUpload,fillOut,remoteFileExists',
49 49
         'Gnd'              => 'search',
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
56 56
     'EWW.' . $_EXTKEY,
57 57
     'Frontendsearch',
58
-    array(
58
+    array (
59 59
         'SearchFE' => 'search,extendedSearch,showSearchForm',
60 60
     ),
61 61
     // non-cacheable actions
62
-    array(
62
+    array (
63 63
         'SearchFE' => 'search,extendedSearch'
64 64
     )
65 65
 );
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
68 68
     'EWW.' . $_EXTKEY,
69 69
     'Getfile',
70
-    array(
70
+    array (
71 71
         'GetFile'     => 'attachment',
72 72
     ),
73 73
     // non-cacheable actions
74
-    array(
74
+    array (
75 75
         'GetFile'     => 'attachment',
76 76
     )
77 77
 );
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
91 91
     'EWW.' . $_EXTKEY,
92 92
     'Backoffice',
93
-    array(
93
+    array (
94 94
         'Workspace'        => 'listWorkspace, initIndex, '
95 95
             .'batch, batchRegister, batchRemove, batchReleaseValidated, batchReleaseUnvalidated, editDocument, batchSetInProgress',
96 96
         'Document'         => 'logout, showDetails, discard, postpone, deleteLocally, deleteLocallySuggestion, register, releasePublish, '
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         'User'             => 'settings, saveSettings',
116 116
     ),
117 117
     // non-cacheable actions
118
-    array(
118
+    array (
119 119
         'Workspace'        => 'listWorkspace, initIndex, '
120 120
             .'batch, batchRegister, batchRemove, batchReleaseValidated, batchReleaseUnvalidated, editDocument, batchSetInProgress',
121 121
         'Document'         => 'logout, showDetails, discard, postpone, deleteLocally, deleteLocallySuggestion, register, releasePublish, '
Please login to merge, or discard this patch.
Classes/Helper/FormDataReader.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     protected function getFields()
139 139
     {
140
-        $fields = array();
140
+        $fields = array ();
141 141
 
142 142
         if (is_array($this->formData['metadata'])) {
143 143
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     protected function getDeletedFiles()
159 159
     {
160
-        $deletedFiles = array();
160
+        $deletedFiles = array ();
161 161
 
162 162
         if (is_array($this->formData['deleteFile'])) {
163 163
             foreach ($this->formData['deleteFile'] as $key => $value) {
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
         $file->setContentType($contentType);
218 218
 
219 219
         $path_parts = pathinfo($fileUrl);
220
-        $origFilename = $path_parts['filename']? $path_parts['filename'] : 'unknown-file-name';
221
-        $origFilename .= $path_parts['extension']? '.'.$path_parts['extension'] : '';
220
+        $origFilename = $path_parts['filename'] ? $path_parts['filename'] : 'unknown-file-name';
221
+        $origFilename .= $path_parts['extension'] ? '.' . $path_parts['extension'] : '';
222 222
         $file->setTitle($origFilename);
223 223
 
224 224
         $file->setLink($fileUrl);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             $documentForm->setComment($this->formData['comment']);
290 290
         }
291 291
 
292
-        $documentData = array();
292
+        $documentData = array ();
293 293
 
294 294
         foreach ($fields as $field) {
295 295
             $pageUid    = $field->getPageUid();
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                                     }
377 377
                                 }
378 378
 
379
-                                if ($metadataObject->isUploadField() ) {
379
+                                if ($metadataObject->isUploadField()) {
380 380
                                     if ($object && is_array($object) &&
381 381
                                         array_key_exists('error', $object) &&
382 382
                                         $object['error'] != UPLOAD_ERR_NO_FILE)
Please login to merge, or discard this patch.
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
 use EWW\Dpf\Domain\Model\MetadataObject;
21 21
 use TYPO3\CMS\Core\Core\Environment;
22 22
 
23
-class FormDataReader
24
-{
23
+class FormDataReader {
25 24
 
26 25
     /**
27 26
      * documentTypeRepository
@@ -114,8 +113,7 @@  discard block
 block discarded – undo
114 113
      */
115 114
     protected $uploadBaseUrl;
116 115
 
117
-    public function __construct()
118
-    {
116
+    public function __construct() {
119 117
 
120 118
         $uploadFileUrl = new \EWW\Dpf\Helper\UploadFileUrl;
121 119
 
@@ -129,14 +127,12 @@  discard block
 block discarded – undo
129 127
      *
130 128
      * @param array $formData
131 129
      */
132
-    public function setFormData($formData)
133
-    {
130
+    public function setFormData($formData) {
134 131
         $this->formData     = $formData;
135 132
         $this->documentType = $this->documentTypeRepository->findByUid($formData['type']);
136 133
     }
137 134
 
138
-    protected function getFields()
139
-    {
135
+    protected function getFields() {
140 136
         $fields = array();
141 137
 
142 138
         if (is_array($this->formData['metadata'])) {
@@ -155,8 +151,7 @@  discard block
 block discarded – undo
155 151
         return $fields;
156 152
     }
157 153
 
158
-    protected function getDeletedFiles()
159
-    {
154
+    protected function getDeletedFiles() {
160 155
         $deletedFiles = array();
161 156
 
162 157
         if (is_array($this->formData['deleteFile'])) {
@@ -176,8 +171,7 @@  discard block
 block discarded – undo
176 171
         return $deletedFiles;
177 172
     }
178 173
 
179
-    public function uploadError()
180
-    {
174
+    public function uploadError() {
181 175
         // todo: To be updated or implemented elsewhere
182 176
         return false;
183 177
 
@@ -200,8 +194,7 @@  discard block
 block discarded – undo
200 194
         return false;
201 195
     }
202 196
 
203
-    protected function getUrlFile($fileUrl, $primary = false, \EWW\Dpf\Domain\Model\File $file = null)
204
-    {
197
+    protected function getUrlFile($fileUrl, $primary = false, \EWW\Dpf\Domain\Model\File $file = null) {
205 198
         if (empty($file)) {
206 199
             $file = $this->objectManager->get(File::class);
207 200
         }
@@ -238,8 +231,7 @@  discard block
 block discarded – undo
238 231
         return $file;
239 232
     }
240 233
 
241
-    protected function getUploadedFile($tmpFile, $primary = false, \EWW\Dpf\Domain\Model\File $file = null)
242
-    {
234
+    protected function getUploadedFile($tmpFile, $primary = false, \EWW\Dpf\Domain\Model\File $file = null) {
243 235
 
244 236
         if (empty($file)) {
245 237
             $file = $this->objectManager->get(File::class);
@@ -273,8 +265,7 @@  discard block
 block discarded – undo
273 265
         return $file;
274 266
     }
275 267
 
276
-    public function getDocumentForm()
277
-    {
268
+    public function getDocumentForm() {
278 269
         $fields = $this->getFields();
279 270
 
280 271
         $documentForm = new \EWW\Dpf\Domain\Model\DocumentForm();
@@ -379,8 +370,7 @@  discard block
 block discarded – undo
379 370
                                 if ($metadataObject->isUploadField() ) {
380 371
                                     if ($object && is_array($object) &&
381 372
                                         array_key_exists('error', $object) &&
382
-                                        $object['error'] != UPLOAD_ERR_NO_FILE)
383
-                                    {
373
+                                        $object['error'] != UPLOAD_ERR_NO_FILE) {
384 374
                                         if (empty($file)) {
385 375
                                             $file = $this->objectManager->get(File::class);
386 376
                                             $file = $this->getUploadedFile(
Please login to merge, or discard this patch.
Upper-Lower-Casing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
30 30
      * @TYPO3\CMS\Extbase\Annotation\Inject
31 31
      */
32
-    protected $documentTypeRepository = null;
32
+    protected $documentTypeRepository = NULL;
33 33
 
34 34
     /**
35 35
      * metadataPageRepository
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @var \EWW\Dpf\Domain\Repository\MetadataPageRepository
38 38
      * @TYPO3\CMS\Extbase\Annotation\Inject
39 39
      */
40
-    protected $metadataPageRepository = null;
40
+    protected $metadataPageRepository = NULL;
41 41
 
42 42
     /**
43 43
      * metadataGroupRepository
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository
46 46
      * @TYPO3\CMS\Extbase\Annotation\Inject
47 47
      */
48
-    protected $metadataGroupRepository = null;
48
+    protected $metadataGroupRepository = NULL;
49 49
 
50 50
     /**
51 51
      * metadataObjectRepository
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository
54 54
      * @TYPO3\CMS\Extbase\Annotation\Inject
55 55
      */
56
-    protected $metadataObjectRepository = null;
56
+    protected $metadataObjectRepository = NULL;
57 57
 
58 58
     /**
59 59
      * fileRepository
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @var \EWW\Dpf\Domain\Repository\FileRepository
62 62
      * @TYPO3\CMS\Extbase\Annotation\Inject
63 63
      */
64
-    protected $fileRepository = null;
64
+    protected $fileRepository = NULL;
65 65
 
66 66
     /**
67 67
      * documentRepository
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @var \EWW\Dpf\Domain\Repository\DocumentRepository
70 70
      * @TYPO3\CMS\Extbase\Annotation\Inject
71 71
      */
72
-    protected $documentRepository = null;
72
+    protected $documentRepository = NULL;
73 73
 
74 74
     /**
75 75
      * objectManager
@@ -179,38 +179,38 @@  discard block
 block discarded – undo
179 179
     public function uploadError()
180 180
     {
181 181
         // todo: To be updated or implemented elsewhere
182
-        return false;
182
+        return FALSE;
183 183
 
184 184
         if (
185 185
             $this->formData['primaryFile'] &&
186 186
             $this->formData['primaryFile']['error'] != UPLOAD_ERR_OK &&
187 187
             $this->formData['primaryFile']['error'] != UPLOAD_ERR_NO_FILE
188 188
         ) {
189
-            return true;
189
+            return TRUE;
190 190
         }
191 191
 
192 192
         if (is_array($this->formData['secondaryFiles'])) {
193 193
             foreach ($this->formData['secondaryFiles'] as $tmpFile) {
194 194
                 if ($tmpFile['error'] != UPLOAD_ERR_OK && $tmpFile['error'] != UPLOAD_ERR_NO_FILE) {
195
-                    return true;
195
+                    return TRUE;
196 196
                 }
197 197
             }
198 198
         }
199 199
 
200
-        return false;
200
+        return FALSE;
201 201
     }
202 202
 
203
-    protected function getUrlFile($fileUrl, $primary = false, \EWW\Dpf\Domain\Model\File $file = null)
203
+    protected function getUrlFile($fileUrl, $primary = FALSE, \EWW\Dpf\Domain\Model\File $file = NULL)
204 204
     {
205 205
         if (empty($file)) {
206 206
             $file = $this->objectManager->get(File::class);
207 207
         }
208 208
 
209
-        $fileName = uniqid(time(), true);
209
+        $fileName = uniqid(time(), TRUE);
210 210
 
211 211
         # get remote mimetype
212 212
         $ch = curl_init($fileUrl);
213
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
213
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
214 214
         curl_exec($ch);
215 215
         $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
216 216
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         $file->setLink($fileUrl);
225 225
         $file->setPrimaryFile($primary);
226
-        $file->setFileIdentifier(uniqid(time(), true));
226
+        $file->setFileIdentifier(uniqid(time(), TRUE));
227 227
 
228 228
         if ($primary) {
229 229
             if ($file->getDatastreamIdentifier()) {
@@ -238,14 +238,14 @@  discard block
 block discarded – undo
238 238
         return $file;
239 239
     }
240 240
 
241
-    protected function getUploadedFile($tmpFile, $primary = false, \EWW\Dpf\Domain\Model\File $file = null)
241
+    protected function getUploadedFile($tmpFile, $primary = FALSE, \EWW\Dpf\Domain\Model\File $file = NULL)
242 242
     {
243 243
 
244 244
         if (empty($file)) {
245 245
             $file = $this->objectManager->get(File::class);
246 246
         }
247 247
 
248
-        $fileName = uniqid(time(), true);
248
+        $fileName = uniqid(time(), TRUE);
249 249
 
250 250
         \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move($tmpFile['tmp_name'], $this->uploadPath . $fileName);
251 251
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $file->setTitle($tmpFile['name']);
259 259
         $file->setLink($fileName);
260 260
         $file->setPrimaryFile($primary);
261
-        $file->setFileIdentifier(uniqid(time(), true));
261
+        $file->setFileIdentifier(uniqid(time(), TRUE));
262 262
 
263 263
         if ($primary) {
264 264
             if ($file->getDatastreamIdentifier()) {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                             if ($metadataGroup->isFileGroup()) {
367 367
 
368 368
                                 // Use the existing file entry
369
-                                $file = null;
369
+                                $file = NULL;
370 370
                                 $document = $this->documentRepository->findByUid($this->formData['documentUid']);
371 371
                                 if ($document) {
372 372
                                     if ($metadataGroup->isPrimaryFileGroup()) {
Please login to merge, or discard this patch.
Classes/Controller/DocumentFormBackofficeController.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
32 32
 
33
-class DocumentFormBackofficeController extends AbstractDocumentFormController
34
-{
33
+class DocumentFormBackofficeController extends AbstractDocumentFormController {
35 34
     /**
36 35
      * documentTransferManager
37 36
      *
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
     /**
82 81
      * DocumentController constructor.
83 82
      */
84
-    public function __construct()
85
-    {
83
+    public function __construct() {
86 84
         parent::__construct();
87 85
 
88 86
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
         $activeGroup = '',
130 128
         $activeGroupIndex = 0,
131 129
         $addCurrentFeUser = true
132
-    )
133
-    {
130
+    ) {
134 131
         /** @var \EWW\Dpf\Domain\Model\Document $document */
135 132
         $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
136 133
 
@@ -179,8 +176,7 @@  discard block
 block discarded – undo
179 176
      * @param \EWW\Dpf\Domain\Model\DocumentForm $documentForm
180 177
      * @param bool $restore
181 178
      */
182
-    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE)
183
-    {
179
+    public function createSuggestionDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $restore = FALSE) {
184 180
         $documentMapper = $this->objectManager->get(DocumentMapper::class);
185 181
 
186 182
         $workingCopy = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -288,8 +284,7 @@  discard block
 block discarded – undo
288 284
     }
289 285
 
290 286
 
291
-    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm)
292
-    {
287
+    public function updateAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm) {
293 288
         if ($this->request->getArgument('documentData')['suggestMod']) {
294 289
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
295 290
             $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
@@ -326,8 +321,7 @@  discard block
 block discarded – undo
326 321
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
327 322
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
328 323
      */
329
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false)
330
-    {
324
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false) {
331 325
         try {
332 326
             /** @var \EWW\Dpf\Domain\Model\Document $document */
333 327
             $document = $this->documentRepository->findByUid($documentForm->getDocumentUid());
@@ -517,8 +511,7 @@  discard block
 block discarded – undo
517 511
         }
518 512
     }
519 513
 
520
-    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm)
521
-    {
514
+    public function createAction(\EWW\Dpf\Domain\Model\DocumentForm $newDocumentForm) {
522 515
         if (!$this->authorizationChecker->isGranted(DocumentVoter::CREATE, new Document())) {
523 516
             $key = 'LLL:EXT:dpf/Resources/Private/Language/locallang.xlf:documentForm.create.accessDenied';
524 517
             $message = LocalizationUtility::translate($key, 'dpf', []);
@@ -577,8 +570,7 @@  discard block
 block discarded – undo
577 570
      *
578 571
      * @return void
579 572
      */
580
-    public function cancelEditAction($documentUid = 0, $backToList = false)
581
-    {
573
+    public function cancelEditAction($documentUid = 0, $backToList = false) {
582 574
         if (empty($documentUid) || $backToList) {
583 575
             $this->redirectToDocumentList();
584 576
         }
@@ -596,14 +588,12 @@  discard block
 block discarded – undo
596 588
      *
597 589
      * @return void
598 590
      */
599
-    public function cancelNewAction()
600
-    {
591
+    public function cancelNewAction() {
601 592
         $this->redirect('list');
602 593
     }
603 594
 
604 595
 
605
-    public function initializeAction()
606
-    {
596
+    public function initializeAction() {
607 597
         $this->authorizationChecker->denyAccessUnlessLoggedIn();
608 598
 
609 599
         parent::initializeAction();
@@ -617,8 +607,7 @@  discard block
 block discarded – undo
617 607
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
618 608
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
619 609
      */
620
-    protected function redirectToDocumentList($message = null)
621
-    {
610
+    protected function redirectToDocumentList($message = null) {
622 611
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
623 612
 
624 613
         if ($redirectUri) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @var \EWW\Dpf\Services\Document\EditingLockService
53 53
      * @TYPO3\CMS\Extbase\Annotation\Inject
54 54
      */
55
-    protected $editingLockService = null;
55
+    protected $editingLockService = NULL;
56 56
 
57 57
     /**
58 58
      * documentManager
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var \EWW\Dpf\Services\Document\DocumentManager
61 61
      * @TYPO3\CMS\Extbase\Annotation\Inject
62 62
      */
63
-    protected $documentManager = null;
63
+    protected $documentManager = NULL;
64 64
 
65 65
     /**
66 66
      * bookmarkRepository
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var \EWW\Dpf\Domain\Repository\BookmarkRepository
69 69
      * @TYPO3\CMS\Extbase\Annotation\Inject
70 70
      */
71
-    protected $bookmarkRepository = null;
71
+    protected $bookmarkRepository = NULL;
72 72
 
73 73
     /**
74 74
      * clientConfigurationManager
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function editAction(
127 127
         \EWW\Dpf\Domain\Model\DocumentForm $documentForm,
128
-        bool $suggestMod = false,
128
+        bool $suggestMod = FALSE,
129 129
         $activeGroup = '',
130 130
         $activeGroupIndex = 0,
131
-        $addCurrentFeUser = true
131
+        $addCurrentFeUser = TRUE
132 132
     )
133 133
     {
134 134
         /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             }
158 158
 
159 159
             $this->addFlashMessage($message, '', AbstractMessage::ERROR);
160
-            $this->redirect('showDetails', 'Document', null, ['document' => $document]);
160
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
161 161
             return FALSE;
162 162
         }
163 163
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $workingCopy = $this->documentRepository->findByUid($documentForm->getDocumentUid());
187 187
 
188 188
         if ($workingCopy->isTemporary()) {
189
-            $workingCopy->setTemporary(false);
189
+            $workingCopy->setTemporary(FALSE);
190 190
         }
191 191
 
192 192
         $newDocument = $this->objectManager->get(Document::class);
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $newDocument->setLinkedUid($document->getUid());
207 207
         }
208 208
 
209
-        $newDocument->setSuggestion(true);
209
+        $newDocument->setSuggestion(TRUE);
210 210
         $newDocument->setComment($document->getComment());
211 211
 
212 212
         if ($restore) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                     ''
246 246
                 );
247 247
             }
248
-            $this->addFlashMessage($flashMessage, '', AbstractMessage::OK, true);
248
+            $this->addFlashMessage($flashMessage, '', AbstractMessage::OK, TRUE);
249 249
 
250 250
             $notifier = $this->objectManager->get(Notifier::class);
251 251
             $notifier->sendAdminNewSuggestionNotification($newDocument);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
         } catch (\Throwable $t) {
283 283
             $severity = \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR;
284
-            $this->addFlashMessage("Failed", '', $severity,false);
284
+            $this->addFlashMessage("Failed", '', $severity,FALSE);
285 285
         }
286 286
 
287 287
         $this->redirectToDocumentList();
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     {
293 293
         if ($this->request->getArgument('documentData')['suggestMod']) {
294 294
             $restore = $this->request->getArgument('documentData')['suggestRestore'];
295
-            $this->forward('createSuggestionDocument', null, null, ['documentForm' => $documentForm, 'restore' => $restore]);
295
+            $this->forward('createSuggestionDocument', NULL, NULL, ['documentForm' => $documentForm, 'restore' => $restore]);
296 296
         }
297 297
 
298 298
         $backToList = $this->request->getArgument('documentData')['backToList'];
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         } elseif ($this->request->hasArgument('saveWorkingCopy')) {
303 303
             $saveMode = 'saveWorkingCopy';
304 304
         } else {
305
-            $saveMode = null;
305
+            $saveMode = NULL;
306 306
         }
307 307
 
308 308
         $this->forward(
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
327 327
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
328 328
      */
329
-    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = null, $backToList = false)
329
+    public function updateDocumentAction(\EWW\Dpf\Domain\Model\DocumentForm $documentForm, $saveMode = NULL, $backToList = FALSE)
330 330
     {
331 331
         try {
332 332
             /** @var \EWW\Dpf\Domain\Model\Document $document */
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
                 $this->addFlashMessage($message, '', AbstractMessage::ERROR);
349 349
 
350 350
                 $this->redirect('cancelEdit',
351
-                    null,
352
-                    null,
351
+                    NULL,
352
+                    NULL,
353 353
                     ['documentUid' => $document->getUid(), 'backToList' => $backToList]
354 354
                 );
355 355
                 /*
@@ -367,13 +367,13 @@  discard block
 block discarded – undo
367 367
             /** @var \EWW\Dpf\Domain\Model\Document $updateDocument */
368 368
             $updateDocument = $documentMapper->getDocument($documentForm);
369 369
 
370
-            $saveWorkingCopy = false;
371
-            $workflowTransition = null;
370
+            $saveWorkingCopy = FALSE;
371
+            $workflowTransition = NULL;
372 372
 
373 373
             // Convert the temporary copy into a local working copy if needed.
374 374
             if ( $updateDocument->isTemporaryCopy() && $saveMode == 'saveWorkingCopy') {
375
-                $saveWorkingCopy = true;
376
-                $updateDocument->setTemporary(false);
375
+                $saveWorkingCopy = TRUE;
376
+                $updateDocument->setTemporary(FALSE);
377 377
                 $workflowTransition = DocumentWorkflow::TRANSITION_IN_PROGRESS;
378 378
             } elseif ($updateDocument->isTemporaryCopy() && $saveMode == 'saveAndUpdate') {
379 379
                 $workflowTransition = DocumentWorkflow::TRANSITION_REMOTE_UPDATE;
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
                 $this->redirectToDocumentList();
482 482
             } else {
483 483
                 $this->redirect('cancelEdit',
484
-                    null,
485
-                    null,
484
+                    NULL,
485
+                    NULL,
486 486
                     ['documentUid' => $updateDocument->getUid(), 'backToList' => $backToList]
487 487
                 );
488 488
                 // $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
@@ -507,13 +507,13 @@  discard block
 block discarded – undo
507 507
 
508 508
             $exceptionMsg[] = LocalizationUtility::translate($key, 'dpf');
509 509
 
510
-            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, true);
510
+            $this->addFlashMessage(implode(" ", $exceptionMsg), '', $severity, TRUE);
511 511
             $this->redirect('cancelEdit',
512
-                null,
513
-                null,
512
+                NULL,
513
+                NULL,
514 514
                 ['documentUid' => $updateDocument->getUid(), 'backToList' => $backToList]
515 515
             );
516
-            $this->redirect('showDetails', 'Document', null, ['document' => $updateDocument]);
516
+            $this->redirect('showDetails', 'Document', NULL, ['document' => $updateDocument]);
517 517
         }
518 518
     }
519 519
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
                 $message,
538 538
                 '',
539 539
                 $severity,
540
-                true
540
+                TRUE
541 541
             );
542 542
 
543 543
         } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
                 implode(" ", $message),
560 560
                 '',
561 561
                 $severity,
562
-                true
562
+                TRUE
563 563
             );
564 564
         }
565 565
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
      *
578 578
      * @return void
579 579
      */
580
-    public function cancelEditAction($documentUid = 0, $backToList = false)
580
+    public function cancelEditAction($documentUid = 0, $backToList = FALSE)
581 581
     {
582 582
         if (empty($documentUid) || $backToList) {
583 583
             $this->redirectToDocumentList();
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 
586 586
         /** @var $document \EWW\Dpf\Domain\Model\Document */
587 587
         $document = $this->documentRepository->findByUid($documentUid);
588
-        $this->redirect('showDetails', 'Document', null, ['document' => $document]);
588
+        $this->redirect('showDetails', 'Document', NULL, ['document' => $document]);
589 589
     }
590 590
 
591 591
     /**
@@ -617,14 +617,14 @@  discard block
 block discarded – undo
617 617
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
618 618
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
619 619
      */
620
-    protected function redirectToDocumentList($message = null)
620
+    protected function redirectToDocumentList($message = NULL)
621 621
     {
622 622
         list($action, $controller, $redirectUri) = $this->session->getStoredAction();
623 623
 
624 624
         if ($redirectUri) {
625 625
             $this->redirectToUri($redirectUri);
626 626
         } else {
627
-            $this->redirect($action, $controller, null, array('message' => $message));
627
+            $this->redirect($action, $controller, NULL, array('message' => $message));
628 628
         }
629 629
     }
630 630
 }
Please login to merge, or discard this patch.
Classes/Controller/AjaxDocumentFormController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             }
235 235
 
236 236
             return json_encode(
237
-                array(
237
+                array (
238 238
                     'error' => false,
239 239
                     'fedoraPid' => $fedoraPid,
240 240
                     'value'    => $urn,
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
         } catch (\Exception $exception) {
245 245
             return json_encode(
246
-                array(
246
+                array (
247 247
                     'error' =>  true,
248 248
                     'fedoraPid' => null,
249 249
                     'value'    => null,
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     public function remoteFileExistsAction(string $fileUrl)
261 261
     {
262 262
         $handle = @fopen($fileUrl, 'r');
263
-        if($handle){
263
+        if ($handle) {
264 264
             return json_encode(['return' => 'true']);
265 265
         } else {
266 266
             return json_encode(['return' => 'false']);
Please login to merge, or discard this patch.
Braces   +9 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 /**
24 24
  * DocumentFormController
25 25
  */
26
-class AjaxDocumentFormController extends \EWW\Dpf\Controller\AbstractController
27
-{
26
+class AjaxDocumentFormController extends \EWW\Dpf\Controller\AbstractController {
28 27
 
29 28
     /**
30 29
      * metadataGroupRepository
@@ -57,8 +56,7 @@  discard block
 block discarded – undo
57 56
      * @param integer $groupIndex
58 57
      * @return void
59 58
      */
60
-    public function groupAction($pageUid, $groupUid, $groupIndex)
61
-    {
59
+    public function groupAction($pageUid, $groupUid, $groupIndex) {
62 60
         /** @var MetadataGroup $group */
63 61
         $group = $this->metadataGroupRepository->findByUid($groupUid);
64 62
 
@@ -118,8 +116,7 @@  discard block
 block discarded – undo
118 116
      * @param integer $fieldIndex
119 117
      * @return void
120 118
      */
121
-    public function fieldAction($pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex)
122
-    {
119
+    public function fieldAction($pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex) {
123 120
 
124 121
         $field = $this->metadataObjectRepository->findByUid($fieldUid);
125 122
 
@@ -154,8 +151,7 @@  discard block
 block discarded – undo
154 151
      *
155 152
      * @return void
156 153
      */
157
-    public function uploadAction($groupIndex)
158
-    {
154
+    public function uploadAction($groupIndex) {
159 155
     }
160 156
 
161 157
     /**
@@ -163,8 +159,7 @@  discard block
 block discarded – undo
163 159
      * @param integer $groupIndex
164 160
      * @return void
165 161
      */
166
-    public function secondaryUploadAction($groupIndex)
167
-    {
162
+    public function secondaryUploadAction($groupIndex) {
168 163
         $this->view->assign('groupIndex', $groupIndex);
169 164
         //$this->view->assign('displayName','Sekundärdatei');
170 165
     }
@@ -178,8 +173,7 @@  discard block
 block discarded – undo
178 173
      * @param int $fieldIndex
179 174
      * @param int $isPrimary
180 175
      */
181
-    public function deleteFileAction($fileUid, $pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex, $isPrimary = 0)
182
-    {
176
+    public function deleteFileAction($fileUid, $pageUid, $groupUid, $groupIndex, $fieldUid, $fieldIndex, $isPrimary = 0) {
183 177
         $field = $this->metadataObjectRepository->findByUid($fieldUid);
184 178
 
185 179
         $fieldItem = new \EWW\Dpf\Domain\Model\DocumentFormField();
@@ -215,8 +209,7 @@  discard block
 block discarded – undo
215 209
      * @param string $fedoraPid
216 210
      * @return string
217 211
      */
218
-    public function fillOutAction($fedoraPid)
219
-    {
212
+    public function fillOutAction($fedoraPid) {
220 213
         try {
221 214
             $urnService = $this->objectManager->get(Urn::class);
222 215
 
@@ -257,10 +250,9 @@  discard block
 block discarded – undo
257 250
      * @param string $fileUrl
258 251
      * @return false|string
259 252
      */
260
-    public function remoteFileExistsAction(string $fileUrl)
261
-    {
253
+    public function remoteFileExistsAction(string $fileUrl) {
262 254
         $handle = @fopen($fileUrl, 'r');
263
-        if($handle){
255
+        if($handle) {
264 256
             return json_encode(['return' => 'true']);
265 257
         } else {
266 258
             return json_encode(['return' => 'false']);
Please login to merge, or discard this patch.