@@ -183,7 +183,7 @@ |
||
| 183 | 183 | 'exclude' => 1, |
| 184 | 184 | 'l10n_mode' => 'exclude', |
| 185 | 185 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mapping', |
| 186 | - // 'displayCond' => 'FIELD:group_type:!IN:file', |
|
| 186 | + // 'displayCond' => 'FIELD:group_type:!IN:file', |
|
| 187 | 187 | 'config' => array( |
| 188 | 188 | 'type' => 'input', |
| 189 | 189 | 'size' => 30, |
@@ -16,8 +16,8 @@ discard block |
||
| 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_metadatagroup', |
| 22 | 22 | 'label' => 'name', |
| 23 | 23 | 'tstamp' => 'tstamp', |
@@ -28,7 +28,7 @@ discard block |
||
| 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 |
||
| 36 | 36 | 'searchFields' => 'name, display_name, mandatory, mapping_for_reading, mapping, mods_extension_mapping, mods_extension_reference, json_mapping, max_iteration, metadata_object, access_restriction_roles, info_text, group_type, optional_groups, required_groups', |
| 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, mandatory, mapping_for_reading, mapping, mods_extension_mapping, mods_extension_reference, json_mapping, max_iteration, metadata_object, access_restriction_roles, info_text, group_type, optional_groups, required_groups', |
| 41 | 41 | ), |
| 42 | - 'types' => array( |
|
| 43 | - '1' => array('showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, --palette--;;1, name, display_name, mandatory, mapping_for_reading, mapping, mods_extension_mapping, mods_extension_reference, json_mapping, max_iteration, metadata_object, access_restriction_roles, info_text, group_type, optional_groups, required_groups, --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, mandatory, mapping_for_reading, mapping, mods_extension_mapping, mods_extension_reference, json_mapping, max_iteration, metadata_object, access_restriction_roles, info_text, group_type, optional_groups, required_groups, --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_metadatagroup', |
| 76 | 76 | 'foreign_table_where' => 'AND tx_dpf_domain_model_metadatagroup.pid=###CURRENT_PID### AND tx_dpf_domain_model_metadatagroup.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,144 +113,144 @@ discard block |
||
| 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( |
|
| 124 | + 'config' => array ( |
|
| 125 | 125 | 'type' => 'input', |
| 126 | 126 | 'renderType' => 'inputDateTime', |
| 127 | 127 | 'size' => 13, |
| 128 | 128 | 'eval' => 'datetime', |
| 129 | 129 | 'checkbox' => 0, |
| 130 | 130 | 'default' => 0, |
| 131 | - 'range' => array( |
|
| 131 | + 'range' => array ( |
|
| 132 | 132 | 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), |
| 133 | 133 | ), |
| 134 | 134 | ), |
| 135 | 135 | ), |
| 136 | 136 | |
| 137 | - 'name' => array( |
|
| 137 | + 'name' => array ( |
|
| 138 | 138 | 'exclude' => 1, |
| 139 | 139 | 'l10n_mode' => 'exclude', |
| 140 | 140 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.name', |
| 141 | - 'config' => array( |
|
| 141 | + 'config' => array ( |
|
| 142 | 142 | 'type' => 'input', |
| 143 | 143 | 'size' => 30, |
| 144 | 144 | 'eval' => 'trim,uniqueInPid', |
| 145 | 145 | ), |
| 146 | 146 | ), |
| 147 | - 'display_name' => array( |
|
| 147 | + 'display_name' => array ( |
|
| 148 | 148 | 'exclude' => 1, |
| 149 | 149 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.display_name', |
| 150 | - 'config' => array( |
|
| 150 | + 'config' => array ( |
|
| 151 | 151 | 'type' => 'input', |
| 152 | 152 | 'size' => 30, |
| 153 | 153 | 'eval' => 'trim', |
| 154 | 154 | ), |
| 155 | 155 | ), |
| 156 | - 'mandatory' => array( |
|
| 156 | + 'mandatory' => array ( |
|
| 157 | 157 | 'exclude' => 1, |
| 158 | 158 | 'l10n_mode' => 'exclude', |
| 159 | 159 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mandatory', |
| 160 | - 'config' => array( |
|
| 160 | + 'config' => array ( |
|
| 161 | 161 | 'type' => 'select', |
| 162 | 162 | 'renderType' => 'selectSingle', |
| 163 | 163 | 'size' => 1, |
| 164 | 164 | 'maxitems' => 1, |
| 165 | - 'items' => array( |
|
| 166 | - array('',''), |
|
| 167 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mandatory_yes', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY), |
|
| 168 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mandatory_file_only', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY_FILE_ONLY), |
|
| 165 | + 'items' => array ( |
|
| 166 | + array ('', ''), |
|
| 167 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mandatory_yes', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY), |
|
| 168 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mandatory_file_only', \EWW\Dpf\Domain\Model\MetadataMandatoryInterface::MANDATORY_FILE_ONLY), |
|
| 169 | 169 | ), |
| 170 | 170 | ), |
| 171 | 171 | ), |
| 172 | - 'mapping_for_reading' => array( |
|
| 172 | + 'mapping_for_reading' => array ( |
|
| 173 | 173 | 'exclude' => 1, |
| 174 | 174 | 'l10n_mode' => 'exclude', |
| 175 | 175 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mapping_for_reading', |
| 176 | 176 | 'displayCond' => 'FIELD:group_type:!IN:file', |
| 177 | - 'config' => array( |
|
| 177 | + 'config' => array ( |
|
| 178 | 178 | 'type' => 'input', |
| 179 | 179 | 'size' => 30, |
| 180 | 180 | 'eval' => 'trim', |
| 181 | 181 | ), |
| 182 | 182 | ), |
| 183 | - 'mapping' => array( |
|
| 183 | + 'mapping' => array ( |
|
| 184 | 184 | 'exclude' => 1, |
| 185 | 185 | 'l10n_mode' => 'exclude', |
| 186 | 186 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mapping', |
| 187 | 187 | // 'displayCond' => 'FIELD:group_type:!IN:file', |
| 188 | - 'config' => array( |
|
| 188 | + 'config' => array ( |
|
| 189 | 189 | 'type' => 'input', |
| 190 | 190 | 'size' => 30, |
| 191 | 191 | 'eval' => 'trim', |
| 192 | 192 | ), |
| 193 | 193 | ), |
| 194 | - 'mods_extension_mapping' => array( |
|
| 194 | + 'mods_extension_mapping' => array ( |
|
| 195 | 195 | 'exclude' => 1, |
| 196 | 196 | 'l10n_mode' => 'exclude', |
| 197 | 197 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.mods_extension_mapping', |
| 198 | 198 | 'displayCond' => 'FIELD:group_type:!IN:file', |
| 199 | - 'config' => array( |
|
| 199 | + 'config' => array ( |
|
| 200 | 200 | 'type' => 'input', |
| 201 | 201 | 'size' => 30, |
| 202 | 202 | 'eval' => 'trim', |
| 203 | 203 | ), |
| 204 | 204 | ), |
| 205 | - 'mods_extension_reference' => array( |
|
| 205 | + 'mods_extension_reference' => 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_metadatagroup.mods_extension_reference', |
| 209 | 209 | 'displayCond' => 'FIELD:group_type:!IN:file', |
| 210 | - 'config' => array( |
|
| 210 | + 'config' => array ( |
|
| 211 | 211 | 'type' => 'input', |
| 212 | 212 | 'size' => 30, |
| 213 | 213 | 'eval' => 'trim', |
| 214 | 214 | ), |
| 215 | 215 | ), |
| 216 | - 'json_mapping' => array( |
|
| 216 | + 'json_mapping' => array ( |
|
| 217 | 217 | 'exclude' => 1, |
| 218 | 218 | 'l10n_mode' => 'exclude', |
| 219 | 219 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.json_mapping', |
| 220 | 220 | 'displayCond' => 'FIELD:group_type:!IN:file', |
| 221 | - 'config' => array( |
|
| 221 | + 'config' => array ( |
|
| 222 | 222 | 'type' => 'input', |
| 223 | 223 | 'size' => 30, |
| 224 | 224 | 'eval' => 'trim', |
| 225 | 225 | ), |
| 226 | 226 | ), |
| 227 | - 'max_iteration' => array( |
|
| 227 | + 'max_iteration' => array ( |
|
| 228 | 228 | 'exclude' => 1, |
| 229 | 229 | 'l10n_mode' => 'exclude', |
| 230 | 230 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.max_iteration', |
| 231 | - 'config' => array( |
|
| 231 | + 'config' => array ( |
|
| 232 | 232 | 'type' => 'input', |
| 233 | 233 | 'size' => 4, |
| 234 | 234 | 'eval' => 'int', |
| 235 | 235 | ), |
| 236 | 236 | ), |
| 237 | - 'access_restriction_roles' => array( |
|
| 237 | + 'access_restriction_roles' => array ( |
|
| 238 | 238 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.access_restriction_roles', |
| 239 | - 'config' => array( |
|
| 239 | + 'config' => array ( |
|
| 240 | 240 | 'type' => 'select', |
| 241 | 241 | 'renderType' => 'selectMultipleSideBySide', |
| 242 | 242 | 'size' => 2, |
| 243 | 243 | 'maxitems' => 2, |
| 244 | - 'items' => array( |
|
| 245 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_researcher', EWW\Dpf\Security\Security::ROLE_RESEARCHER), |
|
| 246 | - array('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_librarian', EWW\Dpf\Security\Security::ROLE_LIBRARIAN), |
|
| 244 | + 'items' => array ( |
|
| 245 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_researcher', EWW\Dpf\Security\Security::ROLE_RESEARCHER), |
|
| 246 | + array ('LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_feusergroup.kitodo_role_librarian', EWW\Dpf\Security\Security::ROLE_LIBRARIAN), |
|
| 247 | 247 | ), |
| 248 | 248 | ), |
| 249 | 249 | ), |
| 250 | - 'info_text' => array( |
|
| 250 | + 'info_text' => array ( |
|
| 251 | 251 | 'exclude' => 1, |
| 252 | 252 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.info_text', |
| 253 | - 'config' => array( |
|
| 253 | + 'config' => array ( |
|
| 254 | 254 | 'type' => 'text', |
| 255 | 255 | 'cols' => 40, |
| 256 | 256 | 'rows' => 15, |
@@ -258,24 +258,24 @@ discard block |
||
| 258 | 258 | 'enableRichtext' => true, |
| 259 | 259 | ), |
| 260 | 260 | ), |
| 261 | - 'metadata_object' => array( |
|
| 261 | + 'metadata_object' => array ( |
|
| 262 | 262 | 'exclude' => 1, |
| 263 | 263 | 'l10n_mode' => 'exclude', |
| 264 | 264 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_metadatagroup.metadata_object', |
| 265 | - 'config' => array( |
|
| 265 | + 'config' => array ( |
|
| 266 | 266 | 'type' => 'inline', |
| 267 | 267 | 'foreign_table' => 'tx_dpf_domain_model_metadataobject', |
| 268 | 268 | 'foreign_field' => 'metadatagroup', |
| 269 | 269 | 'foreign_label' => 'display_name', |
| 270 | 270 | 'foreign_sortby' => 'sorting', |
| 271 | - 'behaviour' => array( |
|
| 271 | + 'behaviour' => array ( |
|
| 272 | 272 | 'disableMovingChildrenWithParent' => 1, |
| 273 | 273 | ), |
| 274 | 274 | 'size' => 10, |
| 275 | 275 | 'autoSizeMax' => 30, |
| 276 | 276 | 'maxitems' => 9999, |
| 277 | 277 | 'multiple' => 0, |
| 278 | - 'appearance' => array( |
|
| 278 | + 'appearance' => array ( |
|
| 279 | 279 | 'collapseAll' => 1, |
| 280 | 280 | 'levelLinksPosition' => 'top', |
| 281 | 281 | 'showSynchronizationLink' => 1, |
@@ -17,6 +17,5 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * The repository for Files |
| 19 | 19 | */ |
| 20 | -class FileRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
|
| 21 | -{ |
|
| 20 | +class FileRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { |
|
| 22 | 21 | } |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | if ($this->accessRestrictionRoles) { |
| 461 | 461 | return array_map('trim', explode(',', $this->accessRestrictionRoles)); |
| 462 | 462 | } else { |
| 463 | - return array(); |
|
| 463 | + return array (); |
|
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | |
@@ -827,7 +827,7 @@ discard block |
||
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | protected function isRepeatable() { |
| 830 | - return !in_array($this->getObjectType(), ['fileDownload','fileArchive','fileLabel']) |
|
| 830 | + return !in_array($this->getObjectType(), ['fileDownload', 'fileArchive', 'fileLabel']) |
|
| 831 | 831 | && $this->getInputField() != self::FILE_UPLOAD; |
| 832 | 832 | } |
| 833 | 833 | } |
@@ -17,8 +17,7 @@ discard block |
||
| 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 |
@@ -229,8 +228,7 @@ discard block |
||
| 229 | 228 | * |
| 230 | 229 | * @return string $name |
| 231 | 230 | */ |
| 232 | - public function getName() |
|
| 233 | - { |
|
| 231 | + public function getName() { |
|
| 234 | 232 | return $this->name; |
| 235 | 233 | } |
| 236 | 234 | |
@@ -240,8 +238,7 @@ discard block |
||
| 240 | 238 | * @param string $name |
| 241 | 239 | * @return void |
| 242 | 240 | */ |
| 243 | - public function setName($name) |
|
| 244 | - { |
|
| 241 | + public function setName($name) { |
|
| 245 | 242 | $this->name = $name; |
| 246 | 243 | } |
| 247 | 244 | |
@@ -250,8 +247,7 @@ discard block |
||
| 250 | 247 | * |
| 251 | 248 | * @return string $displayName |
| 252 | 249 | */ |
| 253 | - public function getDisplayName() |
|
| 254 | - { |
|
| 250 | + public function getDisplayName() { |
|
| 255 | 251 | return $this->displayName; |
| 256 | 252 | } |
| 257 | 253 | |
@@ -261,8 +257,7 @@ discard block |
||
| 261 | 257 | * @param string $displayName |
| 262 | 258 | * @return void |
| 263 | 259 | */ |
| 264 | - public function setDisplayName($displayName) |
|
| 265 | - { |
|
| 260 | + public function setDisplayName($displayName) { |
|
| 266 | 261 | $this->displayName = $displayName; |
| 267 | 262 | } |
| 268 | 263 | |
@@ -271,8 +266,7 @@ discard block |
||
| 271 | 266 | * |
| 272 | 267 | * @return integer $maxIteration |
| 273 | 268 | */ |
| 274 | - public function getMaxIteration() |
|
| 275 | - { |
|
| 269 | + public function getMaxIteration() { |
|
| 276 | 270 | if ($this->isRepeatable()) { |
| 277 | 271 | return $this->maxIteration; |
| 278 | 272 | } |
@@ -285,8 +279,7 @@ discard block |
||
| 285 | 279 | * @param integer $maxIteration |
| 286 | 280 | * @return void |
| 287 | 281 | */ |
| 288 | - public function setMaxIteration($maxIteration) |
|
| 289 | - { |
|
| 282 | + public function setMaxIteration($maxIteration) { |
|
| 290 | 283 | if ($this->isRepeatable()) { |
| 291 | 284 | $this->maxIteration = $maxIteration; |
| 292 | 285 | } else { |
@@ -299,8 +292,7 @@ discard block |
||
| 299 | 292 | * |
| 300 | 293 | * @return string $mandatory |
| 301 | 294 | */ |
| 302 | - public function getMandatory() |
|
| 303 | - { |
|
| 295 | + public function getMandatory() { |
|
| 304 | 296 | return $this->mandatory; |
| 305 | 297 | } |
| 306 | 298 | |
@@ -310,8 +302,7 @@ discard block |
||
| 310 | 302 | * @param string $mandatory |
| 311 | 303 | * @return void |
| 312 | 304 | */ |
| 313 | - public function setMandatory($mandatory) |
|
| 314 | - { |
|
| 305 | + public function setMandatory($mandatory) { |
|
| 315 | 306 | $this->mandatory = $mandatory; |
| 316 | 307 | } |
| 317 | 308 | |
@@ -320,8 +311,7 @@ discard block |
||
| 320 | 311 | * |
| 321 | 312 | * @return boolean $modsExtension |
| 322 | 313 | */ |
| 323 | - public function getModsExtension() |
|
| 324 | - { |
|
| 314 | + public function getModsExtension() { |
|
| 325 | 315 | return $this->modsExtension; |
| 326 | 316 | } |
| 327 | 317 | |
@@ -331,8 +321,7 @@ discard block |
||
| 331 | 321 | * @param boolean $modsExtension |
| 332 | 322 | * @return void |
| 333 | 323 | */ |
| 334 | - public function setModsExtension($modsExtension) |
|
| 335 | - { |
|
| 324 | + public function setModsExtension($modsExtension) { |
|
| 336 | 325 | $this->modsExtension = boolval($modsExtension); |
| 337 | 326 | } |
| 338 | 327 | |
@@ -341,8 +330,7 @@ discard block |
||
| 341 | 330 | * |
| 342 | 331 | * @return boolean |
| 343 | 332 | */ |
| 344 | - public function isModsExtension() |
|
| 345 | - { |
|
| 333 | + public function isModsExtension() { |
|
| 346 | 334 | return $this->modsExtension; |
| 347 | 335 | } |
| 348 | 336 | |
@@ -351,8 +339,7 @@ discard block |
||
| 351 | 339 | * |
| 352 | 340 | * @return string $mapping |
| 353 | 341 | */ |
| 354 | - public function getMapping() |
|
| 355 | - { |
|
| 342 | + public function getMapping() { |
|
| 356 | 343 | return $this->mapping; |
| 357 | 344 | } |
| 358 | 345 | |
@@ -362,8 +349,7 @@ discard block |
||
| 362 | 349 | * @param string $mapping |
| 363 | 350 | * @return void |
| 364 | 351 | */ |
| 365 | - public function setMapping($mapping) |
|
| 366 | - { |
|
| 352 | + public function setMapping($mapping) { |
|
| 367 | 353 | $this->mapping = $mapping; |
| 368 | 354 | } |
| 369 | 355 | |
@@ -372,8 +358,7 @@ discard block |
||
| 372 | 358 | * |
| 373 | 359 | * @return string $relativeMapping |
| 374 | 360 | */ |
| 375 | - public function getRelativeMapping() |
|
| 376 | - { |
|
| 361 | + public function getRelativeMapping() { |
|
| 377 | 362 | return trim($this->mapping, " /"); |
| 378 | 363 | } |
| 379 | 364 | |
@@ -382,8 +367,7 @@ discard block |
||
| 382 | 367 | * |
| 383 | 368 | * @return integer $inputField |
| 384 | 369 | */ |
| 385 | - public function getInputField() |
|
| 386 | - { |
|
| 370 | + public function getInputField() { |
|
| 387 | 371 | return $this->inputField; |
| 388 | 372 | } |
| 389 | 373 | |
@@ -393,8 +377,7 @@ discard block |
||
| 393 | 377 | * @param integer $inputField |
| 394 | 378 | * @return void |
| 395 | 379 | */ |
| 396 | - public function setInputField($inputField) |
|
| 397 | - { |
|
| 380 | + public function setInputField($inputField) { |
|
| 398 | 381 | $this->inputField = $inputField; |
| 399 | 382 | } |
| 400 | 383 | |
@@ -403,8 +386,7 @@ discard block |
||
| 403 | 386 | * |
| 404 | 387 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject |
| 405 | 388 | */ |
| 406 | - public function getChildren() |
|
| 407 | - { |
|
| 389 | + public function getChildren() { |
|
| 408 | 390 | return null; |
| 409 | 391 | } |
| 410 | 392 | |
@@ -413,8 +395,7 @@ discard block |
||
| 413 | 395 | * |
| 414 | 396 | * @return \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList |
| 415 | 397 | */ |
| 416 | - public function getInputOptionList() |
|
| 417 | - { |
|
| 398 | + public function getInputOptionList() { |
|
| 418 | 399 | return $this->inputOptionList; |
| 419 | 400 | } |
| 420 | 401 | |
@@ -424,8 +405,7 @@ discard block |
||
| 424 | 405 | * @param \EWW\Dpf\Domain\Model\InputOptionList $inputOptionList |
| 425 | 406 | * @return void |
| 426 | 407 | */ |
| 427 | - public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList) |
|
| 428 | - { |
|
| 408 | + public function setInputOptionList(\EWW\Dpf\Domain\Model\InputOptionList $inputOptionList) { |
|
| 429 | 409 | $this->inputOptionList = $inputOptionList; |
| 430 | 410 | } |
| 431 | 411 | |
@@ -434,8 +414,7 @@ discard block |
||
| 434 | 414 | * |
| 435 | 415 | * @return string $fillOutService |
| 436 | 416 | */ |
| 437 | - public function getFillOutService() |
|
| 438 | - { |
|
| 417 | + public function getFillOutService() { |
|
| 439 | 418 | return $this->fillOutService; |
| 440 | 419 | } |
| 441 | 420 | |
@@ -445,8 +424,7 @@ discard block |
||
| 445 | 424 | * @param string $fillOutService |
| 446 | 425 | * @return void |
| 447 | 426 | */ |
| 448 | - public function setFillOutService($fillOutService) |
|
| 449 | - { |
|
| 427 | + public function setFillOutService($fillOutService) { |
|
| 450 | 428 | $this->fillOutService = $fillOutService; |
| 451 | 429 | } |
| 452 | 430 | |
@@ -455,8 +433,7 @@ discard block |
||
| 455 | 433 | * |
| 456 | 434 | * @return array $accessRestrictionRoles |
| 457 | 435 | */ |
| 458 | - public function getAccessRestrictionRoles() |
|
| 459 | - { |
|
| 436 | + public function getAccessRestrictionRoles() { |
|
| 460 | 437 | if ($this->accessRestrictionRoles) { |
| 461 | 438 | return array_map('trim', explode(',', $this->accessRestrictionRoles)); |
| 462 | 439 | } else { |
@@ -470,8 +447,7 @@ discard block |
||
| 470 | 447 | * @param array $accessRestrictionRoles |
| 471 | 448 | * @return void |
| 472 | 449 | */ |
| 473 | - public function setAccessRestrictionRoles($accessRestrictionRoles) |
|
| 474 | - { |
|
| 450 | + public function setAccessRestrictionRoles($accessRestrictionRoles) { |
|
| 475 | 451 | $this->accessRestrictionRoles = implode(',', $accessRestrictionRoles); |
| 476 | 452 | } |
| 477 | 453 | |
@@ -480,8 +456,7 @@ discard block |
||
| 480 | 456 | * |
| 481 | 457 | * @return boolean $consent |
| 482 | 458 | */ |
| 483 | - public function getConsent() |
|
| 484 | - { |
|
| 459 | + public function getConsent() { |
|
| 485 | 460 | return $this->consent; |
| 486 | 461 | } |
| 487 | 462 | |
@@ -491,8 +466,7 @@ discard block |
||
| 491 | 466 | * @param boolean $consent |
| 492 | 467 | * @return void |
| 493 | 468 | */ |
| 494 | - public function setConsent($consent) |
|
| 495 | - { |
|
| 469 | + public function setConsent($consent) { |
|
| 496 | 470 | $this->consent = boolval($consent); |
| 497 | 471 | } |
| 498 | 472 | |
@@ -501,8 +475,7 @@ discard block |
||
| 501 | 475 | * |
| 502 | 476 | * @return string $defaultValue |
| 503 | 477 | */ |
| 504 | - public function getDefaultValue() |
|
| 505 | - { |
|
| 478 | + public function getDefaultValue() { |
|
| 506 | 479 | return $this->defaultValue; |
| 507 | 480 | } |
| 508 | 481 | |
@@ -512,8 +485,7 @@ discard block |
||
| 512 | 485 | * @param string $defaultValue |
| 513 | 486 | * @return void |
| 514 | 487 | */ |
| 515 | - public function setDefaultValue($defaultValue) |
|
| 516 | - { |
|
| 488 | + public function setDefaultValue($defaultValue) { |
|
| 517 | 489 | $this->defaultValue = $defaultValue; |
| 518 | 490 | } |
| 519 | 491 | |
@@ -522,8 +494,7 @@ discard block |
||
| 522 | 494 | * |
| 523 | 495 | * @return string $validation |
| 524 | 496 | */ |
| 525 | - public function getValidation() |
|
| 526 | - { |
|
| 497 | + public function getValidation() { |
|
| 527 | 498 | return $this->validation; |
| 528 | 499 | } |
| 529 | 500 | |
@@ -533,8 +504,7 @@ discard block |
||
| 533 | 504 | * @param string $validation |
| 534 | 505 | * @return void |
| 535 | 506 | */ |
| 536 | - public function setValidation($validation) |
|
| 537 | - { |
|
| 507 | + public function setValidation($validation) { |
|
| 538 | 508 | $this->validation = $validation; |
| 539 | 509 | } |
| 540 | 510 | |
@@ -543,8 +513,7 @@ discard block |
||
| 543 | 513 | * |
| 544 | 514 | * @return string $dataType |
| 545 | 515 | */ |
| 546 | - public function getDataType() |
|
| 547 | - { |
|
| 516 | + public function getDataType() { |
|
| 548 | 517 | return $this->dataType; |
| 549 | 518 | } |
| 550 | 519 | |
@@ -554,32 +523,28 @@ discard block |
||
| 554 | 523 | * @param string $dataType |
| 555 | 524 | * @return void |
| 556 | 525 | */ |
| 557 | - public function setDataType($dataType) |
|
| 558 | - { |
|
| 526 | + public function setDataType($dataType) { |
|
| 559 | 527 | $this->dataType = $dataType; |
| 560 | 528 | } |
| 561 | 529 | |
| 562 | 530 | /** |
| 563 | 531 | * @return string |
| 564 | 532 | */ |
| 565 | - public function getGndFieldUid() |
|
| 566 | - { |
|
| 533 | + public function getGndFieldUid() { |
|
| 567 | 534 | return $this->gndFieldUid; |
| 568 | 535 | } |
| 569 | 536 | |
| 570 | 537 | /** |
| 571 | 538 | * @param string $gndFieldUid |
| 572 | 539 | */ |
| 573 | - public function setGndFieldUid($gndFieldUid) |
|
| 574 | - { |
|
| 540 | + public function setGndFieldUid($gndFieldUid) { |
|
| 575 | 541 | $this->gndFieldUid = $gndFieldUid; |
| 576 | 542 | } |
| 577 | 543 | |
| 578 | 544 | /** |
| 579 | 545 | * @return integer |
| 580 | 546 | */ |
| 581 | - public function getMaxInputLength() |
|
| 582 | - { |
|
| 547 | + public function getMaxInputLength() { |
|
| 583 | 548 | if ($this->maxInputLength == 0) { |
| 584 | 549 | if ($this->inputField == self::input) { |
| 585 | 550 | return 255; |
@@ -594,8 +559,7 @@ discard block |
||
| 594 | 559 | /** |
| 595 | 560 | * @return integer |
| 596 | 561 | */ |
| 597 | - public function setMaxInputLength($maxInputLength) |
|
| 598 | - { |
|
| 562 | + public function setMaxInputLength($maxInputLength) { |
|
| 599 | 563 | $this->maxInputLength = $maxInputLength; |
| 600 | 564 | } |
| 601 | 565 | |
@@ -610,8 +574,7 @@ discard block |
||
| 610 | 574 | /** |
| 611 | 575 | * @param bool $embargo |
| 612 | 576 | */ |
| 613 | - public function setEmbargo(bool $embargo) |
|
| 614 | - { |
|
| 577 | + public function setEmbargo(bool $embargo) { |
|
| 615 | 578 | $this->embargo = boolval($embargo); |
| 616 | 579 | } |
| 617 | 580 | |
@@ -658,8 +621,7 @@ discard block |
||
| 658 | 621 | /** |
| 659 | 622 | * @param string $rorMapping |
| 660 | 623 | */ |
| 661 | - public function setRorMapping(string $rorMapping) |
|
| 662 | - { |
|
| 624 | + public function setRorMapping(string $rorMapping) { |
|
| 663 | 625 | $this->rorMapping = $rorMapping; |
| 664 | 626 | } |
| 665 | 627 | |
@@ -797,32 +759,28 @@ discard block |
||
| 797 | 759 | /** |
| 798 | 760 | * @return bool |
| 799 | 761 | */ |
| 800 | - public function isUploadField() |
|
| 801 | - { |
|
| 762 | + public function isUploadField() { |
|
| 802 | 763 | return $this->getInputField() == self::FILE_UPLOAD; |
| 803 | 764 | } |
| 804 | 765 | |
| 805 | 766 | /** |
| 806 | 767 | * @return bool |
| 807 | 768 | */ |
| 808 | - public function isFileLabelField() |
|
| 809 | - { |
|
| 769 | + public function isFileLabelField() { |
|
| 810 | 770 | return $this->getObjectType() == 'fileLabel'; |
| 811 | 771 | } |
| 812 | 772 | |
| 813 | 773 | /** |
| 814 | 774 | * @return bool |
| 815 | 775 | */ |
| 816 | - public function isFileDownloadField() |
|
| 817 | - { |
|
| 776 | + public function isFileDownloadField() { |
|
| 818 | 777 | return $this->getObjectType() == 'fileDownload'; |
| 819 | 778 | } |
| 820 | 779 | |
| 821 | 780 | /** |
| 822 | 781 | * @return bool |
| 823 | 782 | */ |
| 824 | - public function isFileArchiveField() |
|
| 825 | - { |
|
| 783 | + public function isFileArchiveField() { |
|
| 826 | 784 | return $this->getObjectType() == 'fileArchive'; |
| 827 | 785 | } |
| 828 | 786 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @var \EWW\Dpf\Domain\Model\DocumentType |
| 62 | 62 | */ |
| 63 | - protected $documentType = null; |
|
| 63 | + protected $documentType = NULL; |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * objectIdentifier |
@@ -95,14 +95,14 @@ discard block |
||
| 95 | 95 | * |
| 96 | 96 | * @var boolean |
| 97 | 97 | */ |
| 98 | - protected $changed = false; |
|
| 98 | + protected $changed = FALSE; |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * valid |
| 102 | 102 | * |
| 103 | 103 | * @var boolean |
| 104 | 104 | */ |
| 105 | - protected $valid = false; |
|
| 105 | + protected $valid = FALSE; |
|
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | /** |
| 120 | 120 | * @var bool $suggestion |
| 121 | 121 | */ |
| 122 | - protected $suggestion = false; |
|
| 122 | + protected $suggestion = FALSE; |
|
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * creator |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | * |
| 186 | 186 | * @var \DateTime |
| 187 | 187 | */ |
| 188 | - protected $embargoDate = null; |
|
| 188 | + protected $embargoDate = NULL; |
|
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | 191 | * newlyAssignedFobIdentifiers |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | /** |
| 198 | 198 | * @var bool |
| 199 | 199 | */ |
| 200 | - protected $stateChange = false; |
|
| 200 | + protected $stateChange = FALSE; |
|
| 201 | 201 | |
| 202 | 202 | /** |
| 203 | 203 | * file |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> |
| 206 | 206 | * @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove") |
| 207 | 207 | */ |
| 208 | - protected $file = null; |
|
| 208 | + protected $file = NULL; |
|
| 209 | 209 | |
| 210 | 210 | const TRANSFER_ERROR = "ERROR"; |
| 211 | 211 | const TRANSFER_QUEUED = "QUEUED"; |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | public function setObjectIdentifier($objectIdentifier) |
| 379 | 379 | { |
| 380 | 380 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 381 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 381 | + $this->objectIdentifier = empty($objectIdentifier)? NULL : $objectIdentifier; |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | /** |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | return $file; |
| 562 | 562 | } |
| 563 | 563 | } |
| 564 | - return null; |
|
| 564 | + return NULL; |
|
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | /** |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | return $file; |
| 576 | 576 | } |
| 577 | 577 | } |
| 578 | - return null; |
|
| 578 | + return NULL; |
|
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | /** |
@@ -587,12 +587,12 @@ discard block |
||
| 587 | 587 | foreach ($this->getFile() as $file) { |
| 588 | 588 | /** @var File $file */ |
| 589 | 589 | if (!$file->isFileGroupDeleted()) { |
| 590 | - return true; |
|
| 590 | + return TRUE; |
|
| 591 | 591 | } |
| 592 | 592 | } |
| 593 | 593 | } |
| 594 | 594 | |
| 595 | - return false; |
|
| 595 | + return FALSE; |
|
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | /** |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | public function setObjectIdentifier($objectIdentifier) |
| 378 | 378 | { |
| 379 | 379 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 380 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 380 | + $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier; |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | /** |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | */ |
| 713 | 713 | public function getCreator() |
| 714 | 714 | { |
| 715 | - return $this->creator? $this->creator : 0; |
|
| 715 | + return $this->creator ? $this->creator : 0; |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | /** |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | |
| 868 | 868 | foreach ($availableProperties as $propertyName) { |
| 869 | 869 | if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName) |
| 870 | - && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 870 | + && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 871 | 871 | |
| 872 | 872 | $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName); |
| 873 | 873 | \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue); |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | */ |
| 890 | 890 | public function getDocumentIdentifier() |
| 891 | 891 | { |
| 892 | - return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
|
| 892 | + return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid(); |
|
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | /** |
@@ -922,8 +922,8 @@ discard block |
||
| 922 | 922 | public function getPublicationYear() |
| 923 | 923 | { |
| 924 | 924 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 925 | - $year = $internalFormat->getPublishingYear(); |
|
| 926 | - return $year? $year : ""; |
|
| 925 | + $year = $internalFormat->getPublishingYear(); |
|
| 926 | + return $year ? $year : ""; |
|
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | /** |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * Document |
| 23 | 23 | */ |
| 24 | -class Document extends AbstractEntity |
|
| 25 | -{ |
|
| 24 | +class Document extends AbstractEntity { |
|
| 26 | 25 | // xml data size ist limited to 64 KB |
| 27 | 26 | const XML_DATA_SIZE_LIMIT = 64 * 1024; |
| 28 | 27 | |
@@ -213,8 +212,7 @@ discard block |
||
| 213 | 212 | /** |
| 214 | 213 | * __construct |
| 215 | 214 | */ |
| 216 | - public function __construct() |
|
| 217 | - { |
|
| 215 | + public function __construct() { |
|
| 218 | 216 | //Do not remove the next line: It would break the functionality |
| 219 | 217 | $this->initStorageObjects(); |
| 220 | 218 | } |
@@ -224,8 +222,7 @@ discard block |
||
| 224 | 222 | * |
| 225 | 223 | * @return void |
| 226 | 224 | */ |
| 227 | - protected function initStorageObjects() |
|
| 228 | - { |
|
| 225 | + protected function initStorageObjects() { |
|
| 229 | 226 | $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); |
| 230 | 227 | $this->initCreationDate(); |
| 231 | 228 | } |
@@ -235,8 +232,7 @@ discard block |
||
| 235 | 232 | * |
| 236 | 233 | * @return string $title |
| 237 | 234 | */ |
| 238 | - public function getTitle() |
|
| 239 | - { |
|
| 235 | + public function getTitle() { |
|
| 240 | 236 | return $this->title; |
| 241 | 237 | } |
| 242 | 238 | |
@@ -246,8 +242,7 @@ discard block |
||
| 246 | 242 | * @param string $title |
| 247 | 243 | * @return void |
| 248 | 244 | */ |
| 249 | - public function setTitle($title) |
|
| 250 | - { |
|
| 245 | + public function setTitle($title) { |
|
| 251 | 246 | $this->title = $title ?? ''; |
| 252 | 247 | //htmlspecialchars_decode($title,ENT_QUOTES); |
| 253 | 248 | } |
@@ -257,8 +252,7 @@ discard block |
||
| 257 | 252 | * |
| 258 | 253 | * @return array $authors |
| 259 | 254 | */ |
| 260 | - public function getAuthors() |
|
| 261 | - { |
|
| 255 | + public function getAuthors() { |
|
| 262 | 256 | $authors = @unserialize($this->authors); |
| 263 | 257 | if (is_array($authors)) { |
| 264 | 258 | return $authors; |
@@ -273,8 +267,7 @@ discard block |
||
| 273 | 267 | * @param array $authors |
| 274 | 268 | * @return void |
| 275 | 269 | */ |
| 276 | - public function setAuthors($authors) |
|
| 277 | - { |
|
| 270 | + public function setAuthors($authors) { |
|
| 278 | 271 | $this->authors = serialize($authors); |
| 279 | 272 | } |
| 280 | 273 | |
@@ -283,8 +276,7 @@ discard block |
||
| 283 | 276 | * |
| 284 | 277 | * @return string $xmlData |
| 285 | 278 | */ |
| 286 | - public function getXmlData() |
|
| 287 | - { |
|
| 279 | + public function getXmlData() { |
|
| 288 | 280 | return $this->xmlData; |
| 289 | 281 | } |
| 290 | 282 | |
@@ -294,8 +286,7 @@ discard block |
||
| 294 | 286 | * @param string $xmlData |
| 295 | 287 | * @return void |
| 296 | 288 | */ |
| 297 | - public function setXmlData($xmlData) |
|
| 298 | - { |
|
| 289 | + public function setXmlData($xmlData) { |
|
| 299 | 290 | $this->xmlData = $xmlData; |
| 300 | 291 | } |
| 301 | 292 | |
@@ -322,8 +313,7 @@ discard block |
||
| 322 | 313 | * |
| 323 | 314 | * @return string $slubInfoData |
| 324 | 315 | */ |
| 325 | - public function getSlubInfoData() |
|
| 326 | - { |
|
| 316 | + public function getSlubInfoData() { |
|
| 327 | 317 | return $this->slubInfoData; |
| 328 | 318 | } |
| 329 | 319 | |
@@ -332,8 +322,7 @@ discard block |
||
| 332 | 322 | * |
| 333 | 323 | * @return string $slubInfoData |
| 334 | 324 | */ |
| 335 | - public function setSlubInfoData($slubInfoData) |
|
| 336 | - { |
|
| 325 | + public function setSlubInfoData($slubInfoData) { |
|
| 337 | 326 | $this->slubInfoData = $slubInfoData; |
| 338 | 327 | } |
| 339 | 328 | |
@@ -342,8 +331,7 @@ discard block |
||
| 342 | 331 | * |
| 343 | 332 | * @return \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 344 | 333 | */ |
| 345 | - public function getDocumentType() |
|
| 346 | - { |
|
| 334 | + public function getDocumentType() { |
|
| 347 | 335 | return $this->documentType; |
| 348 | 336 | } |
| 349 | 337 | |
@@ -353,8 +341,7 @@ discard block |
||
| 353 | 341 | * @param \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 354 | 342 | * @return void |
| 355 | 343 | */ |
| 356 | - public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 357 | - { |
|
| 344 | + public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 358 | 345 | $this->documentType = $documentType; |
| 359 | 346 | } |
| 360 | 347 | |
@@ -363,8 +350,7 @@ discard block |
||
| 363 | 350 | * |
| 364 | 351 | * @return string |
| 365 | 352 | */ |
| 366 | - public function getObjectIdentifier() |
|
| 367 | - { |
|
| 353 | + public function getObjectIdentifier() { |
|
| 368 | 354 | return $this->objectIdentifier; |
| 369 | 355 | } |
| 370 | 356 | |
@@ -374,8 +360,7 @@ discard block |
||
| 374 | 360 | * @param string $objectIdentifier |
| 375 | 361 | * @return void |
| 376 | 362 | */ |
| 377 | - public function setObjectIdentifier($objectIdentifier) |
|
| 378 | - { |
|
| 363 | + public function setObjectIdentifier($objectIdentifier) { |
|
| 379 | 364 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 380 | 365 | $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
| 381 | 366 | } |
@@ -385,8 +370,7 @@ discard block |
||
| 385 | 370 | * |
| 386 | 371 | * @return string |
| 387 | 372 | */ |
| 388 | - public function getReservedObjectIdentifier() |
|
| 389 | - { |
|
| 373 | + public function getReservedObjectIdentifier() { |
|
| 390 | 374 | return $this->reservedObjectIdentifier; |
| 391 | 375 | } |
| 392 | 376 | |
@@ -396,8 +380,7 @@ discard block |
||
| 396 | 380 | * @param string $reservedObjectIdentifier |
| 397 | 381 | * @return void |
| 398 | 382 | */ |
| 399 | - public function setReservedObjectIdentifier($reservedObjectIdentifier) |
|
| 400 | - { |
|
| 383 | + public function setReservedObjectIdentifier($reservedObjectIdentifier) { |
|
| 401 | 384 | $this->reservedObjectIdentifier = $reservedObjectIdentifier; |
| 402 | 385 | } |
| 403 | 386 | |
@@ -406,8 +389,7 @@ discard block |
||
| 406 | 389 | * |
| 407 | 390 | * @return string |
| 408 | 391 | */ |
| 409 | - public function getTransferStatus() |
|
| 410 | - { |
|
| 392 | + public function getTransferStatus() { |
|
| 411 | 393 | return $this->transferStatus; |
| 412 | 394 | } |
| 413 | 395 | |
@@ -417,8 +399,7 @@ discard block |
||
| 417 | 399 | * @param string |
| 418 | 400 | * @return void |
| 419 | 401 | */ |
| 420 | - public function setTransferStatus($transferStatus) |
|
| 421 | - { |
|
| 402 | + public function setTransferStatus($transferStatus) { |
|
| 422 | 403 | $this->transferStatus = $transferStatus; |
| 423 | 404 | } |
| 424 | 405 | |
@@ -427,8 +408,7 @@ discard block |
||
| 427 | 408 | * |
| 428 | 409 | * @return integer |
| 429 | 410 | */ |
| 430 | - public function getTransferDate() |
|
| 431 | - { |
|
| 411 | + public function getTransferDate() { |
|
| 432 | 412 | return $this->transferDate; |
| 433 | 413 | } |
| 434 | 414 | |
@@ -438,8 +418,7 @@ discard block |
||
| 438 | 418 | * @param integer $transferDate |
| 439 | 419 | * @return void |
| 440 | 420 | */ |
| 441 | - public function setTransferDate($transferDate) |
|
| 442 | - { |
|
| 421 | + public function setTransferDate($transferDate) { |
|
| 443 | 422 | $this->transferDate = $transferDate; |
| 444 | 423 | } |
| 445 | 424 | |
@@ -448,8 +427,7 @@ discard block |
||
| 448 | 427 | * |
| 449 | 428 | * @var integer |
| 450 | 429 | */ |
| 451 | - public function getTransferErrorCode() |
|
| 452 | - { |
|
| 430 | + public function getTransferErrorCode() { |
|
| 453 | 431 | return $this->transferErrorCode; |
| 454 | 432 | } |
| 455 | 433 | |
@@ -459,8 +437,7 @@ discard block |
||
| 459 | 437 | * @param integer $transferErrorCode |
| 460 | 438 | * @return void |
| 461 | 439 | */ |
| 462 | - public function setTransferErrorCode($transferErrorCode) |
|
| 463 | - { |
|
| 440 | + public function setTransferErrorCode($transferErrorCode) { |
|
| 464 | 441 | $this->transferErrorCode = $transferErrorCode; |
| 465 | 442 | } |
| 466 | 443 | |
@@ -469,8 +446,7 @@ discard block |
||
| 469 | 446 | * |
| 470 | 447 | * @var string |
| 471 | 448 | */ |
| 472 | - public function getTransferResponse() |
|
| 473 | - { |
|
| 449 | + public function getTransferResponse() { |
|
| 474 | 450 | return $this->transferResponse; |
| 475 | 451 | } |
| 476 | 452 | |
@@ -480,8 +456,7 @@ discard block |
||
| 480 | 456 | * @param string $transferResponse |
| 481 | 457 | * @return void |
| 482 | 458 | */ |
| 483 | - public function setTransferResponse($transferResponse) |
|
| 484 | - { |
|
| 459 | + public function setTransferResponse($transferResponse) { |
|
| 485 | 460 | $this->transferResponse = $transferResponse; |
| 486 | 461 | } |
| 487 | 462 | |
@@ -490,8 +465,7 @@ discard block |
||
| 490 | 465 | * |
| 491 | 466 | * @var integer |
| 492 | 467 | */ |
| 493 | - public function getTransferHttpStatus() |
|
| 494 | - { |
|
| 468 | + public function getTransferHttpStatus() { |
|
| 495 | 469 | return $this->transferHttpStatus; |
| 496 | 470 | } |
| 497 | 471 | |
@@ -501,8 +475,7 @@ discard block |
||
| 501 | 475 | * @param integer $transferHttpStatus |
| 502 | 476 | * @return void |
| 503 | 477 | */ |
| 504 | - public function setTransferHttpStatus($transferHttpStatus) |
|
| 505 | - { |
|
| 478 | + public function setTransferHttpStatus($transferHttpStatus) { |
|
| 506 | 479 | $this->transferHttpStatus = $transferHttpStatus; |
| 507 | 480 | } |
| 508 | 481 | |
@@ -512,8 +485,7 @@ discard block |
||
| 512 | 485 | * @param \EWW\Dpf\Domain\Model\File $file |
| 513 | 486 | * @return void |
| 514 | 487 | */ |
| 515 | - public function addFile(\EWW\Dpf\Domain\Model\File $file) |
|
| 516 | - { |
|
| 488 | + public function addFile(\EWW\Dpf\Domain\Model\File $file) { |
|
| 517 | 489 | $this->file->attach($file); |
| 518 | 490 | } |
| 519 | 491 | |
@@ -523,8 +495,7 @@ discard block |
||
| 523 | 495 | * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed |
| 524 | 496 | * @return void |
| 525 | 497 | */ |
| 526 | - public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) |
|
| 527 | - { |
|
| 498 | + public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) { |
|
| 528 | 499 | $this->file->detach($fileToRemove); |
| 529 | 500 | } |
| 530 | 501 | |
@@ -533,8 +504,7 @@ discard block |
||
| 533 | 504 | * |
| 534 | 505 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file |
| 535 | 506 | */ |
| 536 | - public function getFile() |
|
| 537 | - { |
|
| 507 | + public function getFile() { |
|
| 538 | 508 | return $this->file; |
| 539 | 509 | } |
| 540 | 510 | |
@@ -544,8 +514,7 @@ discard block |
||
| 544 | 514 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file |
| 545 | 515 | * @return void |
| 546 | 516 | */ |
| 547 | - public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) |
|
| 548 | - { |
|
| 517 | + public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) { |
|
| 549 | 518 | $this->file = $file; |
| 550 | 519 | } |
| 551 | 520 | |
@@ -580,8 +549,7 @@ discard block |
||
| 580 | 549 | /** |
| 581 | 550 | * Has files |
| 582 | 551 | */ |
| 583 | - public function hasFiles() |
|
| 584 | - { |
|
| 552 | + public function hasFiles() { |
|
| 585 | 553 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 586 | 554 | foreach ($this->getFile() as $file) { |
| 587 | 555 | /** @var File $file */ |
@@ -599,8 +567,7 @@ discard block |
||
| 599 | 567 | * |
| 600 | 568 | * @return boolean $changed |
| 601 | 569 | */ |
| 602 | - public function getChanged() |
|
| 603 | - { |
|
| 570 | + public function getChanged() { |
|
| 604 | 571 | return $this->changed; |
| 605 | 572 | } |
| 606 | 573 | |
@@ -610,8 +577,7 @@ discard block |
||
| 610 | 577 | * @param boolean $changed |
| 611 | 578 | * @return void |
| 612 | 579 | */ |
| 613 | - public function setChanged($changed) |
|
| 614 | - { |
|
| 580 | + public function setChanged($changed) { |
|
| 615 | 581 | $this->changed = boolval($changed); |
| 616 | 582 | } |
| 617 | 583 | |
@@ -620,8 +586,7 @@ discard block |
||
| 620 | 586 | * |
| 621 | 587 | * @return boolean $valid |
| 622 | 588 | */ |
| 623 | - public function getValid() |
|
| 624 | - { |
|
| 589 | + public function getValid() { |
|
| 625 | 590 | return $this->valid; |
| 626 | 591 | } |
| 627 | 592 | |
@@ -631,8 +596,7 @@ discard block |
||
| 631 | 596 | * @param boolean $valid |
| 632 | 597 | * @return void |
| 633 | 598 | */ |
| 634 | - public function setValid($valid) |
|
| 635 | - { |
|
| 599 | + public function setValid($valid) { |
|
| 636 | 600 | $this->valid = boolval($valid); |
| 637 | 601 | } |
| 638 | 602 | |
@@ -641,8 +605,7 @@ discard block |
||
| 641 | 605 | * |
| 642 | 606 | * @return string |
| 643 | 607 | */ |
| 644 | - public function getDateIssued() |
|
| 645 | - { |
|
| 608 | + public function getDateIssued() { |
|
| 646 | 609 | return empty($this->dateIssued) ? '' : $this->dateIssued; |
| 647 | 610 | } |
| 648 | 611 | |
@@ -652,8 +615,7 @@ discard block |
||
| 652 | 615 | * @param string $dateIssued |
| 653 | 616 | * @return void |
| 654 | 617 | */ |
| 655 | - public function setDateIssued($dateIssued) |
|
| 656 | - { |
|
| 618 | + public function setDateIssued($dateIssued) { |
|
| 657 | 619 | $this->dateIssued = empty($dateIssued) ? '' : $dateIssued; |
| 658 | 620 | } |
| 659 | 621 | |
@@ -663,8 +625,7 @@ discard block |
||
| 663 | 625 | * |
| 664 | 626 | * @return string |
| 665 | 627 | */ |
| 666 | - public function getProcessNumber() |
|
| 667 | - { |
|
| 628 | + public function getProcessNumber() { |
|
| 668 | 629 | return $this->processNumber; |
| 669 | 630 | } |
| 670 | 631 | |
@@ -674,8 +635,7 @@ discard block |
||
| 674 | 635 | * @param string $processNumber |
| 675 | 636 | * @return void |
| 676 | 637 | */ |
| 677 | - public function setProcessNumber($processNumber) |
|
| 678 | - { |
|
| 638 | + public function setProcessNumber($processNumber) { |
|
| 679 | 639 | $this->processNumber = trim($processNumber); |
| 680 | 640 | } |
| 681 | 641 | |
@@ -684,8 +644,7 @@ discard block |
||
| 684 | 644 | * |
| 685 | 645 | * @return string |
| 686 | 646 | */ |
| 687 | - public function getSubmitterName() |
|
| 688 | - { |
|
| 647 | + public function getSubmitterName() { |
|
| 689 | 648 | try { |
| 690 | 649 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 691 | 650 | return $internalFormat->getSubmitterName(); |
@@ -699,8 +658,7 @@ discard block |
||
| 699 | 658 | * |
| 700 | 659 | * @return string |
| 701 | 660 | */ |
| 702 | - public function getPrimaryUrn() |
|
| 703 | - { |
|
| 661 | + public function getPrimaryUrn() { |
|
| 704 | 662 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 705 | 663 | return $internalFormat->getPrimaryUrn(); |
| 706 | 664 | } |
@@ -710,8 +668,7 @@ discard block |
||
| 710 | 668 | * |
| 711 | 669 | * @return int |
| 712 | 670 | */ |
| 713 | - public function getCreator() |
|
| 714 | - { |
|
| 671 | + public function getCreator() { |
|
| 715 | 672 | return $this->creator? $this->creator : 0; |
| 716 | 673 | } |
| 717 | 674 | |
@@ -721,24 +678,20 @@ discard block |
||
| 721 | 678 | * @param int $creator |
| 722 | 679 | * @return void |
| 723 | 680 | */ |
| 724 | - public function setCreator($creator) |
|
| 725 | - { |
|
| 681 | + public function setCreator($creator) { |
|
| 726 | 682 | $this->creator = $creator; |
| 727 | 683 | } |
| 728 | 684 | |
| 729 | - public function getState() |
|
| 730 | - { |
|
| 685 | + public function getState() { |
|
| 731 | 686 | return $this->state; |
| 732 | 687 | } |
| 733 | 688 | |
| 734 | - public function setState($state) |
|
| 735 | - { |
|
| 689 | + public function setState($state) { |
|
| 736 | 690 | $this->stateChange = $this->state != $state; |
| 737 | 691 | $this->state = $state; |
| 738 | 692 | } |
| 739 | 693 | |
| 740 | - public function getRemoteState() |
|
| 741 | - { |
|
| 694 | + public function getRemoteState() { |
|
| 742 | 695 | $state = explode(':', $this->state); |
| 743 | 696 | if (is_array($state) && array_key_exists(1, $state)) { |
| 744 | 697 | return $state[1]; |
@@ -776,8 +729,7 @@ discard block |
||
| 776 | 729 | /** |
| 777 | 730 | * @return string |
| 778 | 731 | */ |
| 779 | - public function getRemoteLastModDate() |
|
| 780 | - { |
|
| 732 | + public function getRemoteLastModDate() { |
|
| 781 | 733 | return $this->remoteLastModDate; |
| 782 | 734 | } |
| 783 | 735 | |
@@ -785,24 +737,21 @@ discard block |
||
| 785 | 737 | * @param string $remoteLastModDate |
| 786 | 738 | * @return void |
| 787 | 739 | */ |
| 788 | - public function setRemoteLastModDate($remoteLastModDate) |
|
| 789 | - { |
|
| 740 | + public function setRemoteLastModDate($remoteLastModDate) { |
|
| 790 | 741 | $this->remoteLastModDate = $remoteLastModDate; |
| 791 | 742 | } |
| 792 | 743 | |
| 793 | 744 | /** |
| 794 | 745 | * @return integer |
| 795 | 746 | */ |
| 796 | - public function getTstamp() |
|
| 797 | - { |
|
| 747 | + public function getTstamp() { |
|
| 798 | 748 | return $this->tstamp; |
| 799 | 749 | } |
| 800 | 750 | |
| 801 | 751 | /** |
| 802 | 752 | * @return integer |
| 803 | 753 | */ |
| 804 | - public function getPid() |
|
| 805 | - { |
|
| 754 | + public function getPid() { |
|
| 806 | 755 | return $this->pid; |
| 807 | 756 | } |
| 808 | 757 | |
@@ -817,8 +766,7 @@ discard block |
||
| 817 | 766 | /** |
| 818 | 767 | * @param bool $suggestion |
| 819 | 768 | */ |
| 820 | - public function setSuggestion(bool $suggestion) |
|
| 821 | - { |
|
| 769 | + public function setSuggestion(bool $suggestion) { |
|
| 822 | 770 | $this->suggestion = boolval($suggestion); |
| 823 | 771 | } |
| 824 | 772 | |
@@ -833,8 +781,7 @@ discard block |
||
| 833 | 781 | /** |
| 834 | 782 | * @param string $linkedUid |
| 835 | 783 | */ |
| 836 | - public function setLinkedUid(string $linkedUid) |
|
| 837 | - { |
|
| 784 | + public function setLinkedUid(string $linkedUid) { |
|
| 838 | 785 | $this->linkedUid = $linkedUid; |
| 839 | 786 | } |
| 840 | 787 | |
@@ -849,8 +796,7 @@ discard block |
||
| 849 | 796 | /** |
| 850 | 797 | * @param string $comment |
| 851 | 798 | */ |
| 852 | - public function setComment(string $comment) |
|
| 853 | - { |
|
| 799 | + public function setComment(string $comment) { |
|
| 854 | 800 | $this->comment = $comment; |
| 855 | 801 | } |
| 856 | 802 | |
@@ -887,8 +833,7 @@ discard block |
||
| 887 | 833 | * |
| 888 | 834 | * @return string|int |
| 889 | 835 | */ |
| 890 | - public function getDocumentIdentifier() |
|
| 891 | - { |
|
| 836 | + public function getDocumentIdentifier() { |
|
| 892 | 837 | return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
| 893 | 838 | } |
| 894 | 839 | |
@@ -897,8 +842,7 @@ discard block |
||
| 897 | 842 | * |
| 898 | 843 | * @return bool |
| 899 | 844 | */ |
| 900 | - public function isWorkingCopy() |
|
| 901 | - { |
|
| 845 | + public function isWorkingCopy() { |
|
| 902 | 846 | return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion(); |
| 903 | 847 | } |
| 904 | 848 | |
@@ -908,8 +852,7 @@ discard block |
||
| 908 | 852 | * |
| 909 | 853 | * @return bool |
| 910 | 854 | */ |
| 911 | - public function isTemporaryCopy() |
|
| 912 | - { |
|
| 855 | + public function isTemporaryCopy() { |
|
| 913 | 856 | return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion(); |
| 914 | 857 | } |
| 915 | 858 | |
@@ -919,8 +862,7 @@ discard block |
||
| 919 | 862 | * |
| 920 | 863 | * @return string|null |
| 921 | 864 | */ |
| 922 | - public function getPublicationYear() |
|
| 923 | - { |
|
| 865 | + public function getPublicationYear() { |
|
| 924 | 866 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 925 | 867 | $year = $internalFormat->getPublishingYear(); |
| 926 | 868 | return $year? $year : ""; |
@@ -931,8 +873,7 @@ discard block |
||
| 931 | 873 | * |
| 932 | 874 | * @return string|null |
| 933 | 875 | */ |
| 934 | - public function getSourceDetails() |
|
| 935 | - { |
|
| 876 | + public function getSourceDetails() { |
|
| 936 | 877 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 937 | 878 | $data = $internalFormat->getSourceDetails(); |
| 938 | 879 | return $data; |
@@ -949,8 +890,7 @@ discard block |
||
| 949 | 890 | /** |
| 950 | 891 | * @param \DateTime|null $embargoDate |
| 951 | 892 | */ |
| 952 | - public function setEmbargoDate(?\DateTime $embargoDate) |
|
| 953 | - { |
|
| 893 | + public function setEmbargoDate(?\DateTime $embargoDate) { |
|
| 954 | 894 | $this->embargoDate = $embargoDate; |
| 955 | 895 | } |
| 956 | 896 | |
@@ -973,8 +913,7 @@ discard block |
||
| 973 | 913 | /** |
| 974 | 914 | * @return array |
| 975 | 915 | */ |
| 976 | - public function getPreviouslyAssignedFobIdentifiers() |
|
| 977 | - { |
|
| 916 | + public function getPreviouslyAssignedFobIdentifiers() { |
|
| 978 | 917 | return array_diff( |
| 979 | 918 | $this->getAssignedFobIdentifiers(), $this->getNewlyAssignedFobIdentifiers() |
| 980 | 919 | ); |
@@ -1000,8 +939,7 @@ discard block |
||
| 1000 | 939 | /** |
| 1001 | 940 | * @return mixed |
| 1002 | 941 | */ |
| 1003 | - public function getDepositLicense() |
|
| 1004 | - { |
|
| 942 | + public function getDepositLicense() { |
|
| 1005 | 943 | $internalFormat = new InternalFormat($this->getXmlData(), $this->getPid()); |
| 1006 | 944 | $data = $internalFormat->getDepositLicense(); |
| 1007 | 945 | return $data; |
@@ -1044,8 +982,7 @@ discard block |
||
| 1044 | 982 | /** |
| 1045 | 983 | * @return bool |
| 1046 | 984 | */ |
| 1047 | - public function isClientChangeable() |
|
| 1048 | - { |
|
| 985 | + public function isClientChangeable() { |
|
| 1049 | 986 | return ( |
| 1050 | 987 | in_array( |
| 1051 | 988 | $this->getState(), |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | |
| 220 | 220 | public function getFileNames() |
| 221 | 221 | { |
| 222 | - $fileNames = array(); |
|
| 222 | + $fileNames = array (); |
|
| 223 | 223 | foreach ($this->getFiles() as $file) { |
| 224 | 224 | $fileNames[] = $file->getTitle(); |
| 225 | 225 | } |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | * The TYPO3 project - inspiring people to share! |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -class DocumentForm extends AbstractFormElement |
|
| 23 | -{ |
|
| 22 | +class DocumentForm extends AbstractFormElement { |
|
| 24 | 23 | |
| 25 | 24 | /** |
| 26 | 25 | * @var string CSRF token for this form |
@@ -84,8 +83,7 @@ discard block |
||
| 84 | 83 | * |
| 85 | 84 | * @param string $csrfToken |
| 86 | 85 | */ |
| 87 | - public function generateCsrfToken() |
|
| 88 | - { |
|
| 86 | + public function generateCsrfToken() { |
|
| 89 | 87 | $formProtection = FormProtectionFactory::get(); |
| 90 | 88 | $this->csrfToken = $formProtection->generateToken('DocumentForm', 'construct', 'DocumentForm'); |
| 91 | 89 | $formProtection->persistSessionToken(); |
@@ -100,10 +98,8 @@ discard block |
||
| 100 | 98 | * @throws Exception if the given string is empty. |
| 101 | 99 | * @throws TypeError if the given string is null |
| 102 | 100 | */ |
| 103 | - public function setCsrfToken(string $csrfToken) |
|
| 104 | - { |
|
| 105 | - if ($csrfToken === "") |
|
| 106 | - { |
|
| 101 | + public function setCsrfToken(string $csrfToken) { |
|
| 102 | + if ($csrfToken === "") { |
|
| 107 | 103 | throw new Exception("A forms CSRF token cannot be empty"); |
| 108 | 104 | } |
| 109 | 105 | $this->csrfToken = $csrfToken; |
@@ -115,8 +111,7 @@ discard block |
||
| 115 | 111 | * |
| 116 | 112 | * @return string CSRF token for this form |
| 117 | 113 | */ |
| 118 | - public function getCsrfToken() |
|
| 119 | - { |
|
| 114 | + public function getCsrfToken() { |
|
| 120 | 115 | return $this->csrfToken; |
| 121 | 116 | } |
| 122 | 117 | |
@@ -126,8 +121,7 @@ discard block |
||
| 126 | 121 | * |
| 127 | 122 | * @return bool True, is CSRF token is considered valid. False if the token is invalid or missing. |
| 128 | 123 | */ |
| 129 | - public function hasValidCsrfToken() |
|
| 130 | - { |
|
| 124 | + public function hasValidCsrfToken() { |
|
| 131 | 125 | $formProtection = FormProtectionFactory::get(); |
| 132 | 126 | return $formProtection->validateToken($this->csrfToken, 'DocumentForm', 'construct', 'DocumentForm'); |
| 133 | 127 | } |
@@ -136,8 +130,7 @@ discard block |
||
| 136 | 130 | * |
| 137 | 131 | * @return integer |
| 138 | 132 | */ |
| 139 | - public function getDocumentUid() |
|
| 140 | - { |
|
| 133 | + public function getDocumentUid() { |
|
| 141 | 134 | return $this->documentUid; |
| 142 | 135 | } |
| 143 | 136 | |
@@ -145,8 +138,7 @@ discard block |
||
| 145 | 138 | * |
| 146 | 139 | * @param integer $documentUid |
| 147 | 140 | */ |
| 148 | - public function setDocumentUid($documentUid) |
|
| 149 | - { |
|
| 141 | + public function setDocumentUid($documentUid) { |
|
| 150 | 142 | $this->documentUid = $documentUid; |
| 151 | 143 | } |
| 152 | 144 | |
@@ -154,8 +146,7 @@ discard block |
||
| 154 | 146 | * |
| 155 | 147 | * @return boolean |
| 156 | 148 | */ |
| 157 | - public function getPrimaryFileMandatory() |
|
| 158 | - { |
|
| 149 | + public function getPrimaryFileMandatory() { |
|
| 159 | 150 | return $this->primaryFileMandatory; |
| 160 | 151 | } |
| 161 | 152 | |
@@ -163,8 +154,7 @@ discard block |
||
| 163 | 154 | * |
| 164 | 155 | * @param boolean $primaryFileMandatory |
| 165 | 156 | */ |
| 166 | - public function setPrimaryFileMandatory($primaryFileMandatory) |
|
| 167 | - { |
|
| 157 | + public function setPrimaryFileMandatory($primaryFileMandatory) { |
|
| 168 | 158 | $this->primaryFileMandatory = boolval($primaryFileMandatory); |
| 169 | 159 | } |
| 170 | 160 | |
@@ -172,8 +162,7 @@ discard block |
||
| 172 | 162 | * |
| 173 | 163 | * @return string |
| 174 | 164 | */ |
| 175 | - public function getFedoraPid() |
|
| 176 | - { |
|
| 165 | + public function getFedoraPid() { |
|
| 177 | 166 | return $this->fedoraPid; |
| 178 | 167 | } |
| 179 | 168 | |
@@ -181,52 +170,44 @@ discard block |
||
| 181 | 170 | * |
| 182 | 171 | * @param string $fedoraPid |
| 183 | 172 | */ |
| 184 | - public function setFedoraPid($fedoraPid) |
|
| 185 | - { |
|
| 173 | + public function setFedoraPid($fedoraPid) { |
|
| 186 | 174 | $this->fedoraPid = $fedoraPid; |
| 187 | 175 | } |
| 188 | 176 | |
| 189 | - public function getFiles() |
|
| 190 | - { |
|
| 177 | + public function getFiles() { |
|
| 191 | 178 | return $this->files; |
| 192 | 179 | } |
| 193 | 180 | |
| 194 | 181 | /** |
| 195 | 182 | * @return bool |
| 196 | 183 | */ |
| 197 | - public function hasFiles() |
|
| 198 | - { |
|
| 184 | + public function hasFiles() { |
|
| 199 | 185 | return is_array($this->files) && !empty($this->files); |
| 200 | 186 | } |
| 201 | 187 | |
| 202 | - public function setFiles($files) |
|
| 203 | - { |
|
| 188 | + public function setFiles($files) { |
|
| 204 | 189 | $this->files = $files; |
| 205 | 190 | } |
| 206 | 191 | |
| 207 | - public function addFile($file) |
|
| 208 | - { |
|
| 192 | + public function addFile($file) { |
|
| 209 | 193 | $this->files[] = $file; |
| 210 | 194 | } |
| 211 | 195 | |
| 212 | 196 | /** |
| 213 | 197 | * @return bool |
| 214 | 198 | */ |
| 215 | - public function getValid() |
|
| 216 | - { |
|
| 199 | + public function getValid() { |
|
| 217 | 200 | return $this->valid; |
| 218 | 201 | } |
| 219 | 202 | |
| 220 | 203 | /** |
| 221 | 204 | * @param bool $valid |
| 222 | 205 | */ |
| 223 | - public function setValid($valid) |
|
| 224 | - { |
|
| 206 | + public function setValid($valid) { |
|
| 225 | 207 | $this->valid = boolval($valid); |
| 226 | 208 | } |
| 227 | 209 | |
| 228 | - public function getFileNames() |
|
| 229 | - { |
|
| 210 | + public function getFileNames() { |
|
| 230 | 211 | $fileNames = array(); |
| 231 | 212 | foreach ($this->getFiles() as $file) { |
| 232 | 213 | $fileNames[] = $file->getTitle(); |
@@ -239,8 +220,7 @@ discard block |
||
| 239 | 220 | * |
| 240 | 221 | * @return string |
| 241 | 222 | */ |
| 242 | - public function getProcessNumber() |
|
| 243 | - { |
|
| 223 | + public function getProcessNumber() { |
|
| 244 | 224 | return $this->processNumber; |
| 245 | 225 | } |
| 246 | 226 | |
@@ -249,8 +229,7 @@ discard block |
||
| 249 | 229 | * |
| 250 | 230 | * @param string $processNumber |
| 251 | 231 | */ |
| 252 | - public function setProcessNumber($processNumber) |
|
| 253 | - { |
|
| 232 | + public function setProcessNumber($processNumber) { |
|
| 254 | 233 | $this->processNumber = $processNumber; |
| 255 | 234 | } |
| 256 | 235 | |
@@ -259,8 +238,7 @@ discard block |
||
| 259 | 238 | * |
| 260 | 239 | * @return bool |
| 261 | 240 | */ |
| 262 | - public function isTemporary() |
|
| 263 | - { |
|
| 241 | + public function isTemporary() { |
|
| 264 | 242 | return $this->temporary; |
| 265 | 243 | } |
| 266 | 244 | |
@@ -268,24 +246,21 @@ discard block |
||
| 268 | 246 | * Sets if a document is a temporary document or not. |
| 269 | 247 | * @param bool $temporary |
| 270 | 248 | */ |
| 271 | - public function setTemporary($temporary) |
|
| 272 | - { |
|
| 249 | + public function setTemporary($temporary) { |
|
| 273 | 250 | $this->temporary = boolval($temporary); |
| 274 | 251 | } |
| 275 | 252 | |
| 276 | 253 | /** |
| 277 | 254 | * @return string |
| 278 | 255 | */ |
| 279 | - public function getComment() |
|
| 280 | - { |
|
| 256 | + public function getComment() { |
|
| 281 | 257 | return $this->comment; |
| 282 | 258 | } |
| 283 | 259 | |
| 284 | 260 | /** |
| 285 | 261 | * @param string $comment |
| 286 | 262 | */ |
| 287 | - public function setComment($comment) |
|
| 288 | - { |
|
| 263 | + public function setComment($comment) { |
|
| 289 | 264 | $this->comment = $comment; |
| 290 | 265 | } |
| 291 | 266 | } |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | * The TYPO3 project - inspiring people to share! |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -class DocumentFormGroup extends AbstractFormElement |
|
| 18 | -{ |
|
| 17 | +class DocumentFormGroup extends AbstractFormElement { |
|
| 19 | 18 | |
| 20 | 19 | /** |
| 21 | 20 | * infoText |
@@ -49,8 +48,7 @@ discard block |
||
| 49 | 48 | * |
| 50 | 49 | * @return string $infoText |
| 51 | 50 | */ |
| 52 | - public function getInfoText() |
|
| 53 | - { |
|
| 51 | + public function getInfoText() { |
|
| 54 | 52 | return $this->infoText; |
| 55 | 53 | } |
| 56 | 54 | |
@@ -60,24 +58,21 @@ discard block |
||
| 60 | 58 | * @param string $infoText |
| 61 | 59 | * @return void |
| 62 | 60 | */ |
| 63 | - public function setInfoText($infoText) |
|
| 64 | - { |
|
| 61 | + public function setInfoText($infoText) { |
|
| 65 | 62 | $this->infoText = $infoText; |
| 66 | 63 | } |
| 67 | 64 | |
| 68 | 65 | /** |
| 69 | 66 | * @return mixed |
| 70 | 67 | */ |
| 71 | - public function getGroupType() |
|
| 72 | - { |
|
| 68 | + public function getGroupType() { |
|
| 73 | 69 | return $this->groupType; |
| 74 | 70 | } |
| 75 | 71 | |
| 76 | 72 | /** |
| 77 | 73 | * @param mixed $groupType |
| 78 | 74 | */ |
| 79 | - public function setGroupType($groupType) |
|
| 80 | - { |
|
| 75 | + public function setGroupType($groupType) { |
|
| 81 | 76 | $this->groupType = $groupType; |
| 82 | 77 | } |
| 83 | 78 | |
@@ -132,8 +127,7 @@ discard block |
||
| 132 | 127 | /** |
| 133 | 128 | * @param mixed $groupType |
| 134 | 129 | */ |
| 135 | - public function isPrimaryFileGroup() |
|
| 136 | - { |
|
| 130 | + public function isPrimaryFileGroup() { |
|
| 137 | 131 | return $this->groupType == 'primary_file'; |
| 138 | 132 | } |
| 139 | 133 | |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * MetadataGroup |
| 19 | 19 | */ |
| 20 | -class MetadataGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface |
|
| 21 | -{ |
|
| 20 | +class MetadataGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements MetadataMandatoryInterface { |
|
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * name |
@@ -124,8 +123,7 @@ discard block |
||
| 124 | 123 | /** |
| 125 | 124 | * __construct |
| 126 | 125 | */ |
| 127 | - public function __construct() |
|
| 128 | - { |
|
| 126 | + public function __construct() { |
|
| 129 | 127 | //Do not remove the next line: It would break the functionality |
| 130 | 128 | $this->initStorageObjects(); |
| 131 | 129 | } |
@@ -135,8 +133,7 @@ discard block |
||
| 135 | 133 | * |
| 136 | 134 | * @return void |
| 137 | 135 | */ |
| 138 | - protected function initStorageObjects() |
|
| 139 | - { |
|
| 136 | + protected function initStorageObjects() { |
|
| 140 | 137 | $this->metadataObject = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); |
| 141 | 138 | } |
| 142 | 139 | |
@@ -145,8 +142,7 @@ discard block |
||
| 145 | 142 | * |
| 146 | 143 | * @return string $name |
| 147 | 144 | */ |
| 148 | - public function getName() |
|
| 149 | - { |
|
| 145 | + public function getName() { |
|
| 150 | 146 | return $this->name; |
| 151 | 147 | } |
| 152 | 148 | |
@@ -156,8 +152,7 @@ discard block |
||
| 156 | 152 | * @param string $name |
| 157 | 153 | * @return void |
| 158 | 154 | */ |
| 159 | - public function setName($name) |
|
| 160 | - { |
|
| 155 | + public function setName($name) { |
|
| 161 | 156 | $this->name = $name; |
| 162 | 157 | } |
| 163 | 158 | |
@@ -166,8 +161,7 @@ discard block |
||
| 166 | 161 | * |
| 167 | 162 | * @return string $displayName |
| 168 | 163 | */ |
| 169 | - public function getDisplayName() |
|
| 170 | - { |
|
| 164 | + public function getDisplayName() { |
|
| 171 | 165 | return $this->displayName; |
| 172 | 166 | } |
| 173 | 167 | |
@@ -177,8 +171,7 @@ discard block |
||
| 177 | 171 | * @param string $displayName |
| 178 | 172 | * @return void |
| 179 | 173 | */ |
| 180 | - public function setDisplayName($displayName) |
|
| 181 | - { |
|
| 174 | + public function setDisplayName($displayName) { |
|
| 182 | 175 | $this->displayName = $displayName; |
| 183 | 176 | } |
| 184 | 177 | |
@@ -187,8 +180,7 @@ discard block |
||
| 187 | 180 | * |
| 188 | 181 | * @return string $mandatory |
| 189 | 182 | */ |
| 190 | - public function getMandatory() |
|
| 191 | - { |
|
| 183 | + public function getMandatory() { |
|
| 192 | 184 | return $this->mandatory; |
| 193 | 185 | } |
| 194 | 186 | |
@@ -198,8 +190,7 @@ discard block |
||
| 198 | 190 | * @param string $mandatory |
| 199 | 191 | * @return void |
| 200 | 192 | */ |
| 201 | - public function setMandatory($mandatory) |
|
| 202 | - { |
|
| 193 | + public function setMandatory($mandatory) { |
|
| 203 | 194 | $this->mandatory = $mandatory; |
| 204 | 195 | } |
| 205 | 196 | |
@@ -208,8 +199,7 @@ discard block |
||
| 208 | 199 | * |
| 209 | 200 | * @return string $mapping |
| 210 | 201 | */ |
| 211 | - public function getMapping() |
|
| 212 | - { |
|
| 202 | + public function getMapping() { |
|
| 213 | 203 | return $this->mapping; |
| 214 | 204 | } |
| 215 | 205 | |
@@ -219,8 +209,7 @@ discard block |
||
| 219 | 209 | * @param string $mapping |
| 220 | 210 | * @return void |
| 221 | 211 | */ |
| 222 | - public function setMapping($mapping) |
|
| 223 | - { |
|
| 212 | + public function setMapping($mapping) { |
|
| 224 | 213 | $this->mapping = $mapping; |
| 225 | 214 | } |
| 226 | 215 | |
@@ -229,8 +218,7 @@ discard block |
||
| 229 | 218 | * |
| 230 | 219 | * @return string $mappingForReading |
| 231 | 220 | */ |
| 232 | - public function getMappingForReading() |
|
| 233 | - { |
|
| 221 | + public function getMappingForReading() { |
|
| 234 | 222 | return $this->mappingForReading; |
| 235 | 223 | } |
| 236 | 224 | |
@@ -240,8 +228,7 @@ discard block |
||
| 240 | 228 | * @param string $mappingForReading |
| 241 | 229 | * @return void |
| 242 | 230 | */ |
| 243 | - public function setMappingForReading($mappingForReading) |
|
| 244 | - { |
|
| 231 | + public function setMappingForReading($mappingForReading) { |
|
| 245 | 232 | $this->mappingForReading = $mappingForReading; |
| 246 | 233 | } |
| 247 | 234 | |
@@ -250,8 +237,7 @@ discard block |
||
| 250 | 237 | * |
| 251 | 238 | * @return bool |
| 252 | 239 | */ |
| 253 | - public function hasMappingForReading() |
|
| 254 | - { |
|
| 240 | + public function hasMappingForReading() { |
|
| 255 | 241 | $mapping = trim($this->mappingForReading); |
| 256 | 242 | return !empty($mapping); |
| 257 | 243 | } |
@@ -262,8 +248,7 @@ discard block |
||
| 262 | 248 | * @param $mapping |
| 263 | 249 | * @return string $relativeMapping |
| 264 | 250 | */ |
| 265 | - protected function relativeMapping($mapping) |
|
| 266 | - { |
|
| 251 | + protected function relativeMapping($mapping) { |
|
| 267 | 252 | return trim($mapping, " /"); |
| 268 | 253 | } |
| 269 | 254 | |
@@ -272,8 +257,7 @@ discard block |
||
| 272 | 257 | * |
| 273 | 258 | * @return string $relativeMappingForWriting |
| 274 | 259 | */ |
| 275 | - public function getRelativeMapping() |
|
| 276 | - { |
|
| 260 | + public function getRelativeMapping() { |
|
| 277 | 261 | return $this->relativeMapping($this->mapping); |
| 278 | 262 | } |
| 279 | 263 | |
@@ -282,8 +266,7 @@ discard block |
||
| 282 | 266 | * |
| 283 | 267 | * @return string $relativeMappingForReading |
| 284 | 268 | */ |
| 285 | - public function getRelativeMappingForReading() |
|
| 286 | - { |
|
| 269 | + public function getRelativeMappingForReading() { |
|
| 287 | 270 | return $this->relativeMapping($this->mappingForReading); |
| 288 | 271 | } |
| 289 | 272 | |
@@ -292,8 +275,7 @@ discard block |
||
| 292 | 275 | * |
| 293 | 276 | * @return string $absoluteMappingForWriting |
| 294 | 277 | */ |
| 295 | - public function getAbsoluteMapping() |
|
| 296 | - { |
|
| 278 | + public function getAbsoluteMapping() { |
|
| 297 | 279 | return "/data/" . $this->getRelativeMapping(); |
| 298 | 280 | } |
| 299 | 281 | |
@@ -302,8 +284,7 @@ discard block |
||
| 302 | 284 | * |
| 303 | 285 | * @return string $absoluteMappingForReading |
| 304 | 286 | */ |
| 305 | - public function getAbsoluteMappingForReading() |
|
| 306 | - { |
|
| 287 | + public function getAbsoluteMappingForReading() { |
|
| 307 | 288 | return "/data/" . $this->getRelativeMappingForReading(); |
| 308 | 289 | } |
| 309 | 290 | |
@@ -312,8 +293,7 @@ discard block |
||
| 312 | 293 | * |
| 313 | 294 | * @return string $modsExtensionMapping |
| 314 | 295 | */ |
| 315 | - public function getModsExtensionMapping() |
|
| 316 | - { |
|
| 296 | + public function getModsExtensionMapping() { |
|
| 317 | 297 | return $this->modsExtensionMapping; |
| 318 | 298 | } |
| 319 | 299 | |
@@ -323,8 +303,7 @@ discard block |
||
| 323 | 303 | * @param string $modsExtensionMapping |
| 324 | 304 | * @return void |
| 325 | 305 | */ |
| 326 | - public function setModsExtensionMapping($modsExtensionMapping) |
|
| 327 | - { |
|
| 306 | + public function setModsExtensionMapping($modsExtensionMapping) { |
|
| 328 | 307 | $this->modsExtensionMapping = $modsExtensionMapping; |
| 329 | 308 | } |
| 330 | 309 | |
@@ -333,8 +312,7 @@ discard block |
||
| 333 | 312 | * |
| 334 | 313 | * @return string $relativeModsExtensionMapping |
| 335 | 314 | */ |
| 336 | - public function getRelativeModsExtensionMapping() |
|
| 337 | - { |
|
| 315 | + public function getRelativeModsExtensionMapping() { |
|
| 338 | 316 | // $modsRegExp = "/^.*?mods:mods/i"; |
| 339 | 317 | // $mapping = preg_replace($modsRegExp, "", $this->modsExtensionMapping); |
| 340 | 318 | return trim($this->modsExtensionMapping, " /"); |
@@ -345,8 +323,7 @@ discard block |
||
| 345 | 323 | * |
| 346 | 324 | * @return string $absoluteModsExtensionMapping |
| 347 | 325 | */ |
| 348 | - public function getAbsoluteModsExtensionMapping() |
|
| 349 | - { |
|
| 326 | + public function getAbsoluteModsExtensionMapping() { |
|
| 350 | 327 | return "/data/" . $this->getRelativeModsExtensionMapping(); |
| 351 | 328 | } |
| 352 | 329 | |
@@ -356,8 +333,7 @@ discard block |
||
| 356 | 333 | * @param string $modsExtensionReference |
| 357 | 334 | * @return void |
| 358 | 335 | */ |
| 359 | - public function setModsExtensionReference($modsExtensionReference) |
|
| 360 | - { |
|
| 336 | + public function setModsExtensionReference($modsExtensionReference) { |
|
| 361 | 337 | $this->modsExtensionReference = $modsExtensionReference; |
| 362 | 338 | } |
| 363 | 339 | |
@@ -366,8 +342,7 @@ discard block |
||
| 366 | 342 | * |
| 367 | 343 | * @return string $modsExtensionReference |
| 368 | 344 | */ |
| 369 | - public function getModsExtensionReference() |
|
| 370 | - { |
|
| 345 | + public function getModsExtensionReference() { |
|
| 371 | 346 | return $this->modsExtensionReference; |
| 372 | 347 | } |
| 373 | 348 | |
@@ -376,8 +351,7 @@ discard block |
||
| 376 | 351 | * |
| 377 | 352 | * @return integer $maxIteration |
| 378 | 353 | */ |
| 379 | - public function getMaxIteration() |
|
| 380 | - { |
|
| 354 | + public function getMaxIteration() { |
|
| 381 | 355 | if ($this->isPrimaryFileGroup()) { |
| 382 | 356 | return 1; |
| 383 | 357 | } |
@@ -390,8 +364,7 @@ discard block |
||
| 390 | 364 | * @param integer $maxIteration |
| 391 | 365 | * @return void |
| 392 | 366 | */ |
| 393 | - public function setMaxIteration($maxIteration) |
|
| 394 | - { |
|
| 367 | + public function setMaxIteration($maxIteration) { |
|
| 395 | 368 | if ($this->isPrimaryFileGroup()) { |
| 396 | 369 | $maxIteration = 1; |
| 397 | 370 | } |
@@ -404,8 +377,7 @@ discard block |
||
| 404 | 377 | * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObject |
| 405 | 378 | * @return void |
| 406 | 379 | */ |
| 407 | - public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject) |
|
| 408 | - { |
|
| 380 | + public function addMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObject) { |
|
| 409 | 381 | $this->metadataObject->attach($metadataObject); |
| 410 | 382 | } |
| 411 | 383 | |
@@ -415,8 +387,7 @@ discard block |
||
| 415 | 387 | * @param \EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove The MetadataObject to be removed |
| 416 | 388 | * @return void |
| 417 | 389 | */ |
| 418 | - public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove) |
|
| 419 | - { |
|
| 390 | + public function removeMetadataObject(\EWW\Dpf\Domain\Model\MetadataObject $metadataObjectToRemove) { |
|
| 420 | 391 | $this->metadataObject->detach($metadataObjectToRemove); |
| 421 | 392 | } |
| 422 | 393 | |
@@ -425,8 +396,7 @@ discard block |
||
| 425 | 396 | * |
| 426 | 397 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject |
| 427 | 398 | */ |
| 428 | - public function getMetadataObject() |
|
| 429 | - { |
|
| 399 | + public function getMetadataObject() { |
|
| 430 | 400 | return $this->metadataObject; |
| 431 | 401 | } |
| 432 | 402 | |
@@ -436,8 +406,7 @@ discard block |
||
| 436 | 406 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject |
| 437 | 407 | * @return void |
| 438 | 408 | */ |
| 439 | - public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject) |
|
| 440 | - { |
|
| 409 | + public function setMetadataObject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $metadataObject) { |
|
| 441 | 410 | $this->metadataObject = $metadataObject; |
| 442 | 411 | } |
| 443 | 412 | |
@@ -446,8 +415,7 @@ discard block |
||
| 446 | 415 | * |
| 447 | 416 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\MetadataObject> $metadataObject |
| 448 | 417 | */ |
| 449 | - public function getChildren() |
|
| 450 | - { |
|
| 418 | + public function getChildren() { |
|
| 451 | 419 | return $this->getMetadataObject(); |
| 452 | 420 | } |
| 453 | 421 | |
@@ -456,8 +424,7 @@ discard block |
||
| 456 | 424 | * |
| 457 | 425 | * @return array $accessRestrictionRoles |
| 458 | 426 | */ |
| 459 | - public function getAccessRestrictionRoles() |
|
| 460 | - { |
|
| 427 | + public function getAccessRestrictionRoles() { |
|
| 461 | 428 | if ($this->accessRestrictionRoles) { |
| 462 | 429 | return array_map('trim', explode(',', $this->accessRestrictionRoles)); |
| 463 | 430 | } else { |
@@ -471,8 +438,7 @@ discard block |
||
| 471 | 438 | * @param array $accessRestrictionRoles |
| 472 | 439 | * @return void |
| 473 | 440 | */ |
| 474 | - public function setAccessRestrictionRoles($accessRestrictionRoles) |
|
| 475 | - { |
|
| 441 | + public function setAccessRestrictionRoles($accessRestrictionRoles) { |
|
| 476 | 442 | $this->accessRestrictionRoles = implode(',', $accessRestrictionRoles); |
| 477 | 443 | } |
| 478 | 444 | |
@@ -481,8 +447,7 @@ discard block |
||
| 481 | 447 | * |
| 482 | 448 | * @return string $infoText |
| 483 | 449 | */ |
| 484 | - public function getInfoText() |
|
| 485 | - { |
|
| 450 | + public function getInfoText() { |
|
| 486 | 451 | return $this->infoText; |
| 487 | 452 | } |
| 488 | 453 | |
@@ -492,8 +457,7 @@ discard block |
||
| 492 | 457 | * @param string $infoText |
| 493 | 458 | * @return void |
| 494 | 459 | */ |
| 495 | - public function setInfoText($infoText) |
|
| 496 | - { |
|
| 460 | + public function setInfoText($infoText) { |
|
| 497 | 461 | $this->infoText = $infoText; |
| 498 | 462 | } |
| 499 | 463 | |
@@ -508,23 +472,19 @@ discard block |
||
| 508 | 472 | /** |
| 509 | 473 | * @param string $groupType |
| 510 | 474 | */ |
| 511 | - public function setGroupType(string $groupType) |
|
| 512 | - { |
|
| 475 | + public function setGroupType(string $groupType) { |
|
| 513 | 476 | $this->groupType = $groupType; |
| 514 | 477 | } |
| 515 | 478 | |
| 516 | - public function isFileGroup() |
|
| 517 | - { |
|
| 479 | + public function isFileGroup() { |
|
| 518 | 480 | return $this->isPrimaryFileGroup() || $this->isSecondaryFileGroup(); |
| 519 | 481 | } |
| 520 | 482 | |
| 521 | - public function isPrimaryFileGroup() |
|
| 522 | - { |
|
| 483 | + public function isPrimaryFileGroup() { |
|
| 523 | 484 | return $this->getGroupType() == 'primary_file'; |
| 524 | 485 | } |
| 525 | 486 | |
| 526 | - public function isSecondaryFileGroup() |
|
| 527 | - { |
|
| 487 | + public function isSecondaryFileGroup() { |
|
| 528 | 488 | return $this->getGroupType() == 'secondary_file'; |
| 529 | 489 | } |
| 530 | 490 | |
@@ -30,8 +30,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | /** @var \EWW\Dpf\Helper\DocumentMapper $documentMapper */ |
| 523 | 516 | $documentMapper = $this->objectManager->get(DocumentMapper::class); |
| 524 | 517 | |
@@ -584,8 +577,7 @@ discard block |
||
| 584 | 577 | * |
| 585 | 578 | * @return void |
| 586 | 579 | */ |
| 587 | - public function cancelEditAction($documentUid = 0, $backToList = false) |
|
| 588 | - { |
|
| 580 | + public function cancelEditAction($documentUid = 0, $backToList = false) { |
|
| 589 | 581 | if (empty($documentUid) || $backToList) { |
| 590 | 582 | $this->redirectToDocumentList(); |
| 591 | 583 | } |
@@ -603,14 +595,12 @@ discard block |
||
| 603 | 595 | * |
| 604 | 596 | * @return void |
| 605 | 597 | */ |
| 606 | - public function cancelNewAction() |
|
| 607 | - { |
|
| 598 | + public function cancelNewAction() { |
|
| 608 | 599 | $this->redirect('list'); |
| 609 | 600 | } |
| 610 | 601 | |
| 611 | 602 | |
| 612 | - public function initializeAction() |
|
| 613 | - { |
|
| 603 | + public function initializeAction() { |
|
| 614 | 604 | $this->authorizationChecker->denyAccessUnlessLoggedIn(); |
| 615 | 605 | |
| 616 | 606 | parent::initializeAction(); |
@@ -624,8 +614,7 @@ discard block |
||
| 624 | 614 | * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException |
| 625 | 615 | * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException |
| 626 | 616 | */ |
| 627 | - protected function redirectToDocumentList($message = null) |
|
| 628 | - { |
|
| 617 | + protected function redirectToDocumentList($message = null) { |
|
| 629 | 618 | list($action, $controller, $redirectUri) = $this->session->getStoredAction(); |
| 630 | 619 | |
| 631 | 620 | if ($redirectUri) { |
@@ -52,7 +52,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | $args[] = $document->getTitle(); |
| 531 | 531 | $message = LocalizationUtility::translate($key, 'dpf', $args); |
| 532 | 532 | $this->addFlashMessage($message, '', AbstractMessage::ERROR); |
| 533 | - $this->redirect('showDetails', 'Document', null, ['document' => $document]); |
|
| 533 | + $this->redirect('showDetails', 'Document', NULL, ['document' => $document]); |
|
| 534 | 534 | return FALSE; |
| 535 | 535 | } |
| 536 | 536 | |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | $message, |
| 545 | 545 | '', |
| 546 | 546 | $severity, |
| 547 | - true |
|
| 547 | + TRUE |
|
| 548 | 548 | ); |
| 549 | 549 | |
| 550 | 550 | } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | implode(" ", $message), |
| 567 | 567 | '', |
| 568 | 568 | $severity, |
| 569 | - true |
|
| 569 | + TRUE |
|
| 570 | 570 | ); |
| 571 | 571 | } |
| 572 | 572 | |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | * |
| 585 | 585 | * @return void |
| 586 | 586 | */ |
| 587 | - public function cancelEditAction($documentUid = 0, $backToList = false) |
|
| 587 | + public function cancelEditAction($documentUid = 0, $backToList = FALSE) |
|
| 588 | 588 | { |
| 589 | 589 | if (empty($documentUid) || $backToList) { |
| 590 | 590 | $this->redirectToDocumentList(); |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | |
| 593 | 593 | /** @var $document \EWW\Dpf\Domain\Model\Document */ |
| 594 | 594 | $document = $this->documentRepository->findByUid($documentUid); |
| 595 | - $this->redirect('showDetails', 'Document', null, ['document' => $document]); |
|
| 595 | + $this->redirect('showDetails', 'Document', NULL, ['document' => $document]); |
|
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | /** |
@@ -624,14 +624,14 @@ discard block |
||
| 624 | 624 | * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException |
| 625 | 625 | * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException |
| 626 | 626 | */ |
| 627 | - protected function redirectToDocumentList($message = null) |
|
| 627 | + protected function redirectToDocumentList($message = NULL) |
|
| 628 | 628 | { |
| 629 | 629 | list($action, $controller, $redirectUri) = $this->session->getStoredAction(); |
| 630 | 630 | |
| 631 | 631 | if ($redirectUri) { |
| 632 | 632 | $this->redirectToUri($redirectUri); |
| 633 | 633 | } else { |
| 634 | - $this->redirect($action, $controller, null, array('message' => $message)); |
|
| 634 | + $this->redirect($action, $controller, NULL, array('message' => $message)); |
|
| 635 | 635 | } |
| 636 | 636 | } |
| 637 | 637 | } |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | /** |
| 51 | 51 | * GetFileController |
| 52 | 52 | */ |
| 53 | -class GetFileController extends \EWW\Dpf\Controller\AbstractController |
|
| 54 | -{ |
|
| 53 | +class GetFileController extends \EWW\Dpf\Controller\AbstractController { |
|
| 55 | 54 | |
| 56 | 55 | /** |
| 57 | 56 | * documentRepository |
@@ -69,8 +68,7 @@ discard block |
||
| 69 | 68 | */ |
| 70 | 69 | protected $clientConfigurationManager; |
| 71 | 70 | |
| 72 | - public function attachmentAction() |
|
| 73 | - { |
|
| 71 | + public function attachmentAction() { |
|
| 74 | 72 | |
| 75 | 73 | $piVars = GeneralUtility::_GP('tx_dpf'); // get GET params from powermail |
| 76 | 74 | |
@@ -293,8 +291,7 @@ discard block |
||
| 293 | 291 | |
| 294 | 292 | } |
| 295 | 293 | |
| 296 | - private static function sanitizeFilename($filename) |
|
| 297 | - { |
|
| 294 | + private static function sanitizeFilename($filename) { |
|
| 298 | 295 | // remove anything which isn't a word, whitespace, number or any of the following caracters -_~,;[](). |
| 299 | 296 | $filename = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename); |
| 300 | 297 | // turn diacritical characters to ASCII |
@@ -306,8 +303,7 @@ discard block |
||
| 306 | 303 | return $filename; |
| 307 | 304 | } |
| 308 | 305 | |
| 309 | - private function buildMetsXml($document) |
|
| 310 | - { |
|
| 306 | + private function buildMetsXml($document) { |
|
| 311 | 307 | $parserGenerator = new ParserGenerator(); |
| 312 | 308 | $parserGenerator->setXML($document->getXmlData()); |
| 313 | 309 | |
@@ -323,8 +319,7 @@ discard block |
||
| 323 | 319 | return $XSLTransformator->getTransformedOutputXML($document); |
| 324 | 320 | } |
| 325 | 321 | |
| 326 | - private function isForbidden($action) |
|
| 327 | - { |
|
| 322 | + private function isForbidden($action) { |
|
| 328 | 323 | $allowed = |
| 329 | 324 | array_key_exists('allowedActions', $this->settings) |
| 330 | 325 | && is_array($this->settings['allowedActions']) |
@@ -199,22 +199,22 @@ discard block |
||
| 199 | 199 | // allow dissemination if a request parameter 'deliverInactive' has the secret |
| 200 | 200 | // TYPOScript configuration value 'deliverInactiveSecretKey' |
| 201 | 201 | |
| 202 | - $restrictToActiveDocuments = true; |
|
| 202 | + $restrictToActiveDocuments = TRUE; |
|
| 203 | 203 | $deliverInactiveSecretKey = $this->settings['deliverInactiveSecretKey']; |
| 204 | 204 | |
| 205 | 205 | if ($deliverInactiveSecretKey == $piVars['deliverInactive']) { |
| 206 | - $restrictToActiveDocuments = false; |
|
| 206 | + $restrictToActiveDocuments = FALSE; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - if (true === $isRepositoryObject) { |
|
| 210 | - if (true === $restrictToActiveDocuments) { |
|
| 209 | + if (TRUE === $isRepositoryObject) { |
|
| 210 | + if (TRUE === $restrictToActiveDocuments) { |
|
| 211 | 211 | // if restriction applies, check object state before dissemination |
| 212 | 212 | $objectProfileURI = rtrim('http://' . $fedoraHost, |
| 213 | 213 | "/") . '/fedora/objects/' . $piVars['qid'] . '?format=XML'; |
| 214 | 214 | $objectProfileXML = file_get_contents($objectProfileURI); |
| 215 | - if (false !== $objectProfileXML) { |
|
| 215 | + if (FALSE !== $objectProfileXML) { |
|
| 216 | 216 | $objectProfileDOM = new \DOMDocument('1.0', 'UTF-8'); |
| 217 | - if (true === $objectProfileDOM->loadXML($objectProfileXML)) { |
|
| 217 | + if (TRUE === $objectProfileDOM->loadXML($objectProfileXML)) { |
|
| 218 | 218 | $objectState = $objectProfileDOM->getElementsByTagName('objState')[0]; |
| 219 | 219 | if ('I' === $objectState->nodeValue) { |
| 220 | 220 | $this->response->setStatus(403); |
@@ -235,29 +235,29 @@ discard block |
||
| 235 | 235 | // get remote header and set it before passtrough |
| 236 | 236 | $headers = get_headers($path); |
| 237 | 237 | |
| 238 | - if (false === $headers) { |
|
| 238 | + if (FALSE === $headers) { |
|
| 239 | 239 | $this->response->setStatus(500); |
| 240 | 240 | return 'Error while fetching headers'; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - $contentDispFlag = false; |
|
| 244 | - $contentTypeFlag = false; |
|
| 243 | + $contentDispFlag = FALSE; |
|
| 244 | + $contentTypeFlag = FALSE; |
|
| 245 | 245 | |
| 246 | 246 | foreach ($headers as $value) { |
| 247 | 247 | |
| 248 | - if (false !== stripos($value, 'Content-Disposition')) { |
|
| 248 | + if (FALSE !== stripos($value, 'Content-Disposition')) { |
|
| 249 | 249 | header($value); |
| 250 | - $contentDispFlag = true; |
|
| 250 | + $contentDispFlag = TRUE; |
|
| 251 | 251 | continue; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - if (false !== stripos($value, 'Content-Type')) { |
|
| 254 | + if (FALSE !== stripos($value, 'Content-Type')) { |
|
| 255 | 255 | header($value); |
| 256 | - $contentTypeFlag = true; |
|
| 256 | + $contentTypeFlag = TRUE; |
|
| 257 | 257 | continue; |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - if (false !== stripos($value, 'Content-Length')) { |
|
| 260 | + if (FALSE !== stripos($value, 'Content-Length')) { |
|
| 261 | 261 | header($value); |
| 262 | 262 | continue; |
| 263 | 263 | } |