@@ -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_storedsearch', |
| 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,97 +36,97 @@ discard block |
||
| 36 | 36 | 'searchFields' => 'title', |
| 37 | 37 | 'iconfile' => 'EXT:dpf/Resources/Public/Icons/tx_dpf_domain_model_editinglock.gif', |
| 38 | 38 | ), |
| 39 | - 'interface' => array( |
|
| 39 | + 'interface' => array ( |
|
| 40 | 40 | 'showRecordFieldList' => 'name, query', |
| 41 | 41 | ), |
| 42 | - 'types' => array( |
|
| 43 | - '1' => array('showitem' => ',--palette--;;1, |
|
| 42 | + 'types' => array ( |
|
| 43 | + '1' => array ('showitem' => ',--palette--;;1, |
|
| 44 | 44 | name, query, |
| 45 | 45 | --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access'), |
| 46 | 46 | ), |
| 47 | - 'palettes' => array( |
|
| 48 | - '1' => array('showitem' => ''), |
|
| 47 | + 'palettes' => array ( |
|
| 48 | + '1' => array ('showitem' => ''), |
|
| 49 | 49 | ), |
| 50 | - 'columns' => array( |
|
| 50 | + 'columns' => array ( |
|
| 51 | 51 | |
| 52 | - 'sys_language_uid' => array( |
|
| 52 | + 'sys_language_uid' => array ( |
|
| 53 | 53 | 'exclude' => 1, |
| 54 | 54 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', |
| 55 | - 'config' => array( |
|
| 55 | + 'config' => array ( |
|
| 56 | 56 | 'type' => 'select', |
| 57 | 57 | 'renderType' => 'selectSingle', |
| 58 | 58 | 'foreign_table' => 'sys_language', |
| 59 | 59 | 'foreign_table_where' => 'ORDER BY sys_language.title', |
| 60 | - 'items' => array( |
|
| 61 | - array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), |
|
| 62 | - array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0), |
|
| 60 | + 'items' => array ( |
|
| 61 | + array ('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1), |
|
| 62 | + array ('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0), |
|
| 63 | 63 | ), |
| 64 | 64 | ), |
| 65 | 65 | ), |
| 66 | - 'l10n_parent' => array( |
|
| 66 | + 'l10n_parent' => array ( |
|
| 67 | 67 | 'displayCond' => 'FIELD:sys_language_uid:>:0', |
| 68 | 68 | 'exclude' => 1, |
| 69 | 69 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', |
| 70 | - 'config' => array( |
|
| 70 | + 'config' => array ( |
|
| 71 | 71 | 'type' => 'select', |
| 72 | 72 | 'renderType' => 'selectSingle', |
| 73 | - 'items' => array( |
|
| 74 | - array('', 0), |
|
| 73 | + 'items' => array ( |
|
| 74 | + array ('', 0), |
|
| 75 | 75 | ), |
| 76 | 76 | 'foreign_table' => 'tx_dpf_domain_model_storedsearch', |
| 77 | 77 | 'foreign_table_where' => 'AND tx_dpf_domain_model_storedsearch.pid=###CURRENT_PID### AND tx_dpf_domain_model_storedsearch.sys_language_uid IN (-1,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 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', |
| 98 | - 'config' => array( |
|
| 98 | + 'config' => array ( |
|
| 99 | 99 | 'type' => 'check', |
| 100 | 100 | ), |
| 101 | 101 | ), |
| 102 | - 'starttime' => array( |
|
| 102 | + 'starttime' => array ( |
|
| 103 | 103 | 'exclude' => 1, |
| 104 | 104 | 'l10n_mode' => 'mergeIfNotBlank', |
| 105 | 105 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', |
| 106 | - 'config' => array( |
|
| 106 | + 'config' => array ( |
|
| 107 | 107 | 'type' => 'input', |
| 108 | 108 | 'renderType' => 'inputDateTime', |
| 109 | 109 | 'size' => 13, |
| 110 | 110 | 'eval' => 'datetime', |
| 111 | 111 | 'checkbox' => 0, |
| 112 | 112 | 'default' => 0, |
| 113 | - 'range' => array( |
|
| 113 | + 'range' => array ( |
|
| 114 | 114 | 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), |
| 115 | 115 | ), |
| 116 | 116 | ), |
| 117 | 117 | ), |
| 118 | - 'endtime' => array( |
|
| 118 | + 'endtime' => array ( |
|
| 119 | 119 | 'exclude' => 1, |
| 120 | 120 | 'l10n_mode' => 'mergeIfNotBlank', |
| 121 | 121 | 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', |
| 122 | - 'config' => array( |
|
| 122 | + 'config' => array ( |
|
| 123 | 123 | 'type' => 'input', |
| 124 | 124 | 'renderType' => 'inputDateTime', |
| 125 | 125 | 'size' => 13, |
| 126 | 126 | 'eval' => 'datetime', |
| 127 | 127 | 'checkbox' => 0, |
| 128 | 128 | 'default' => 0, |
| 129 | - 'range' => array( |
|
| 129 | + 'range' => array ( |
|
| 130 | 130 | 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), |
| 131 | 131 | ), |
| 132 | 132 | ), |
@@ -138,20 +138,20 @@ discard block |
||
| 138 | 138 | ], |
| 139 | 139 | ], |
| 140 | 140 | |
| 141 | - 'name' => array( |
|
| 141 | + 'name' => array ( |
|
| 142 | 142 | 'exclude' => 1, |
| 143 | 143 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_storedsearch.name', |
| 144 | - 'config' => array( |
|
| 144 | + 'config' => array ( |
|
| 145 | 145 | 'type' => 'input', |
| 146 | 146 | 'size' => 30, |
| 147 | 147 | 'eval' => 'trim', |
| 148 | 148 | ), |
| 149 | 149 | ), |
| 150 | 150 | |
| 151 | - 'query' => array( |
|
| 151 | + 'query' => array ( |
|
| 152 | 152 | 'exclude' => 1, |
| 153 | 153 | 'label' => 'LLL:EXT:dpf/Resources/Private/Language/locallang_db.xlf:tx_dpf_domain_model_storedsearch.query', |
| 154 | - 'config' => array( |
|
| 154 | + 'config' => array ( |
|
| 155 | 155 | 'type' => 'text', |
| 156 | 156 | 'cols' => 40, |
| 157 | 157 | 'rows' => 15, |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | 'tstamp' => 'tstamp', |
| 23 | 23 | 'crdate' => 'crdate', |
| 24 | 24 | 'cruser_id' => 'cruser_id', |
| 25 | - 'versioningWS' => true, |
|
| 25 | + 'versioningWS' => TRUE, |
|
| 26 | 26 | 'languageField' => 'sys_language_uid', |
| 27 | 27 | 'transOrigPointerField' => 'l10n_parent', |
| 28 | 28 | 'transOrigDiffSourceField' => 'l10n_diffsource', |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | ], |
| 31 | 31 | */ |
| 32 | 32 | 'stored_searches' => [ |
| 33 | - 'exclude' => true, |
|
| 33 | + 'exclude' => TRUE, |
|
| 34 | 34 | 'label' => 'stored_searches', |
| 35 | 35 | 'config' => [ |
| 36 | 36 | 'type' => 'inline', |
@@ -14,8 +14,7 @@ discard block |
||
| 14 | 14 | * The TYPO3 project - inspiring people to share! |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | -class KitodoRoleViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper |
|
| 18 | -{ |
|
| 17 | +class KitodoRoleViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper { |
|
| 19 | 18 | /** |
| 20 | 19 | * security |
| 21 | 20 | * |
@@ -29,8 +28,7 @@ discard block |
||
| 29 | 28 | * |
| 30 | 29 | * @return string |
| 31 | 30 | */ |
| 32 | - public function render() |
|
| 33 | - { |
|
| 31 | + public function render() { |
|
| 34 | 32 | return $this->security->getUser()->getUserRole(); |
| 35 | 33 | } |
| 36 | 34 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @var \EWW\Dpf\Security\Security |
| 23 | 23 | * @inject |
| 24 | 24 | */ |
| 25 | - protected $security = null; |
|
| 25 | + protected $security = NULL; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Shows the frontend user name of the given frontenduser user id. |
@@ -16,8 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | use EWW\Dpf\Domain\Workflow\DocumentWorkflow; |
| 18 | 18 | |
| 19 | -class SearchSessionData |
|
| 20 | -{ |
|
| 19 | +class SearchSessionData { |
|
| 21 | 20 | /** |
| 22 | 21 | * @var array |
| 23 | 22 | */ |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | * |
| 55 | 54 | * @return array |
| 56 | 55 | */ |
| 57 | - public function getExcludeFilters() |
|
| 58 | - { |
|
| 56 | + public function getExcludeFilters() { |
|
| 59 | 57 | return $this->excludeFilters; |
| 60 | 58 | } |
| 61 | 59 | |
@@ -64,8 +62,7 @@ discard block |
||
| 64 | 62 | * Toggles the discarded documents filter. |
| 65 | 63 | * |
| 66 | 64 | */ |
| 67 | - public function toggleExcludeDiscardedFilter() |
|
| 68 | - { |
|
| 65 | + public function toggleExcludeDiscardedFilter() { |
|
| 69 | 66 | if (array_key_exists('aliasState', $this->excludeFilters)) { |
| 70 | 67 | unset($this->excludeFilters['aliasState']); |
| 71 | 68 | } else { |
@@ -78,8 +75,7 @@ discard block |
||
| 78 | 75 | * Toggles the hide bookmarks filter. |
| 79 | 76 | * |
| 80 | 77 | */ |
| 81 | - public function toggleBookmarksOnlyFilter() |
|
| 82 | - { |
|
| 78 | + public function toggleBookmarksOnlyFilter() { |
|
| 83 | 79 | if (array_key_exists('bookmarks', $this->excludeFilters)) { |
| 84 | 80 | unset($this->excludeFilters['bookmarks']); |
| 85 | 81 | } else { |
@@ -93,8 +89,7 @@ discard block |
||
| 93 | 89 | * @param $name |
| 94 | 90 | * @param array $values |
| 95 | 91 | */ |
| 96 | - public function setFilter($name, $values = []) |
|
| 97 | - { |
|
| 92 | + public function setFilter($name, $values = []) { |
|
| 98 | 93 | if ($name && $values && is_array($values)) { |
| 99 | 94 | $this->filters[$name] = $values; |
| 100 | 95 | } elseif ($name) { |
@@ -108,8 +103,7 @@ discard block |
||
| 108 | 103 | * |
| 109 | 104 | * @return array |
| 110 | 105 | */ |
| 111 | - public function clearFilters() |
|
| 112 | - { |
|
| 106 | + public function clearFilters() { |
|
| 113 | 107 | $this->filters = []; |
| 114 | 108 | } |
| 115 | 109 | |
@@ -119,8 +113,7 @@ discard block |
||
| 119 | 113 | * |
| 120 | 114 | * @return array |
| 121 | 115 | */ |
| 122 | - public function getFilters() |
|
| 123 | - { |
|
| 116 | + public function getFilters() { |
|
| 124 | 117 | return $this->filters; |
| 125 | 118 | } |
| 126 | 119 | |
@@ -129,8 +122,7 @@ discard block |
||
| 129 | 122 | * Removes the sort information |
| 130 | 123 | * |
| 131 | 124 | */ |
| 132 | - public function clearSort() |
|
| 133 | - { |
|
| 125 | + public function clearSort() { |
|
| 134 | 126 | $this->sortField = ''; |
| 135 | 127 | $this->sortOrder = ''; |
| 136 | 128 | } |
@@ -140,8 +132,7 @@ discard block |
||
| 140 | 132 | * |
| 141 | 133 | * @return string |
| 142 | 134 | */ |
| 143 | - public function getSortField() |
|
| 144 | - { |
|
| 135 | + public function getSortField() { |
|
| 145 | 136 | return $this->sortField; |
| 146 | 137 | } |
| 147 | 138 | |
@@ -150,8 +141,7 @@ discard block |
||
| 150 | 141 | * |
| 151 | 142 | * @param string $fieldName |
| 152 | 143 | */ |
| 153 | - public function setSortField($fieldName) |
|
| 154 | - { |
|
| 144 | + public function setSortField($fieldName) { |
|
| 155 | 145 | $this->sortField = $fieldName; |
| 156 | 146 | } |
| 157 | 147 | |
@@ -160,8 +150,7 @@ discard block |
||
| 160 | 150 | * |
| 161 | 151 | * @return string |
| 162 | 152 | */ |
| 163 | - public function getSortOrder() |
|
| 164 | - { |
|
| 153 | + public function getSortOrder() { |
|
| 165 | 154 | return $this->sortOrder; |
| 166 | 155 | } |
| 167 | 156 | |
@@ -170,8 +159,7 @@ discard block |
||
| 170 | 159 | * |
| 171 | 160 | * @param string $order |
| 172 | 161 | */ |
| 173 | - public function setSortOrder($order) |
|
| 174 | - { |
|
| 162 | + public function setSortOrder($order) { |
|
| 175 | 163 | $this->sortOrder = $order; |
| 176 | 164 | } |
| 177 | 165 | |
@@ -180,8 +168,7 @@ discard block |
||
| 180 | 168 | * |
| 181 | 169 | * @return string |
| 182 | 170 | */ |
| 183 | - public function getSimpleQuery() |
|
| 184 | - { |
|
| 171 | + public function getSimpleQuery() { |
|
| 185 | 172 | return $this->simpleQuery; |
| 186 | 173 | } |
| 187 | 174 | |
@@ -190,8 +177,7 @@ discard block |
||
| 190 | 177 | * |
| 191 | 178 | * @param string $query |
| 192 | 179 | */ |
| 193 | - public function setSimpleQuery($query) |
|
| 194 | - { |
|
| 180 | + public function setSimpleQuery($query) { |
|
| 195 | 181 | $this->simpleQuery = $query; |
| 196 | 182 | } |
| 197 | 183 | |
@@ -200,8 +186,7 @@ discard block |
||
| 200 | 186 | * |
| 201 | 187 | * @return int |
| 202 | 188 | */ |
| 203 | - public function getItemsPerPage() |
|
| 204 | - { |
|
| 189 | + public function getItemsPerPage() { |
|
| 205 | 190 | return $this->itemsPerPage; |
| 206 | 191 | } |
| 207 | 192 | |
@@ -210,8 +195,7 @@ discard block |
||
| 210 | 195 | * |
| 211 | 196 | * @param int $itemsPerPage |
| 212 | 197 | */ |
| 213 | - public function setItemsPerPage($itemsPerPage) |
|
| 214 | - { |
|
| 198 | + public function setItemsPerPage($itemsPerPage) { |
|
| 215 | 199 | $this->itemsPerPage = $itemsPerPage; |
| 216 | 200 | } |
| 217 | 201 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * @var string |
| 43 | 43 | */ |
| 44 | - protected $simpleQuery = null; |
|
| 44 | + protected $simpleQuery = NULL; |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @var int |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if (array_key_exists('bookmarks', $this->excludeFilters)) { |
| 84 | 84 | unset($this->excludeFilters['bookmarks']); |
| 85 | 85 | } else { |
| 86 | - $this->excludeFilters['bookmarks'] = true; |
|
| 86 | + $this->excludeFilters['bookmarks'] = TRUE; |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
@@ -15,8 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | |
| 18 | -class Mods |
|
| 19 | -{ |
|
| 18 | +class Mods { |
|
| 20 | 19 | /** |
| 21 | 20 | * metadataObjectRepository |
| 22 | 21 | * |
@@ -36,13 +35,11 @@ discard block |
||
| 36 | 35 | |
| 37 | 36 | protected $modsDom; |
| 38 | 37 | |
| 39 | - public function __construct($modsXml) |
|
| 40 | - { |
|
| 38 | + public function __construct($modsXml) { |
|
| 41 | 39 | $this->setModsXml($modsXml); |
| 42 | 40 | } |
| 43 | 41 | |
| 44 | - public function setModsXml($modsXml) |
|
| 45 | - { |
|
| 42 | + public function setModsXml($modsXml) { |
|
| 46 | 43 | $modsDom = new \DOMDocument(); |
| 47 | 44 | if (!empty($modsXml)) { |
| 48 | 45 | if (is_null(@$modsDom->loadXML($modsXml))) { |
@@ -52,19 +49,16 @@ discard block |
||
| 52 | 49 | $this->modsDom = $modsDom; |
| 53 | 50 | } |
| 54 | 51 | |
| 55 | - public function getModsXml() |
|
| 56 | - { |
|
| 52 | + public function getModsXml() { |
|
| 57 | 53 | return $this->modsDom->saveXML(); |
| 58 | 54 | } |
| 59 | 55 | |
| 60 | - public function getModsXpath() |
|
| 61 | - { |
|
| 56 | + public function getModsXpath() { |
|
| 62 | 57 | $xpath = \EWW\Dpf\Helper\XPath::create($this->modsDom); |
| 63 | 58 | return $xpath; |
| 64 | 59 | } |
| 65 | 60 | |
| 66 | - public function getTitle() |
|
| 67 | - { |
|
| 61 | + public function getTitle() { |
|
| 68 | 62 | $titleNode = $this->getModsXpath()->query('/mods:mods/mods:titleInfo[@usage="primary"]/mods:title'); |
| 69 | 63 | |
| 70 | 64 | if ($titleNode->length == 0) { |
@@ -73,13 +67,11 @@ discard block |
||
| 73 | 67 | return $titleNode->item(0)->nodeValue; |
| 74 | 68 | } |
| 75 | 69 | |
| 76 | - public function getAuthors() |
|
| 77 | - { |
|
| 70 | + public function getAuthors() { |
|
| 78 | 71 | return $this->getPersons("aut"); |
| 79 | 72 | } |
| 80 | 73 | |
| 81 | - public function getPublishers() |
|
| 82 | - { |
|
| 74 | + public function getPublishers() { |
|
| 83 | 75 | return $this->getPersons("edt"); |
| 84 | 76 | } |
| 85 | 77 | |
@@ -89,8 +81,7 @@ discard block |
||
| 89 | 81 | * @param $role |
| 90 | 82 | * @return array |
| 91 | 83 | */ |
| 92 | - protected function getPersons($role) |
|
| 93 | - { |
|
| 84 | + protected function getPersons($role) { |
|
| 94 | 85 | $xpath = $this->getModsXpath(); |
| 95 | 86 | |
| 96 | 87 | $authorNode = $xpath->query('/mods:mods/mods:name[mods:role/mods:roleTerm[@type="code"]="'.$role.'"]'); |
@@ -119,8 +110,7 @@ discard block |
||
| 119 | 110 | return $authors; |
| 120 | 111 | } |
| 121 | 112 | |
| 122 | - public function setDateIssued($date) |
|
| 123 | - { |
|
| 113 | + public function setDateIssued($date) { |
|
| 124 | 114 | |
| 125 | 115 | $originInfo = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]'); |
| 126 | 116 | |
@@ -160,8 +150,7 @@ discard block |
||
| 160 | 150 | } |
| 161 | 151 | |
| 162 | 152 | |
| 163 | - public function getPublishingYear() |
|
| 164 | - { |
|
| 153 | + public function getPublishingYear() { |
|
| 165 | 154 | $year = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="publication"]/mods:dateIssued[@encoding="iso8601"]'); |
| 166 | 155 | if ($year->length > 0) { |
| 167 | 156 | return $year->item(0)->nodeValue; |
@@ -170,8 +159,7 @@ discard block |
||
| 170 | 159 | return null; |
| 171 | 160 | } |
| 172 | 161 | |
| 173 | - public function getOriginalSourceTitle() |
|
| 174 | - { |
|
| 162 | + public function getOriginalSourceTitle() { |
|
| 175 | 163 | $node= $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]/mods:titleInfo/mods:title'); |
| 176 | 164 | if ($node->length > 0) { |
| 177 | 165 | return $node->item(0)->nodeValue; |
@@ -180,8 +168,7 @@ discard block |
||
| 180 | 168 | return null; |
| 181 | 169 | } |
| 182 | 170 | |
| 183 | - public function getDateIssued() |
|
| 184 | - { |
|
| 171 | + public function getDateIssued() { |
|
| 185 | 172 | |
| 186 | 173 | $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]'); |
| 187 | 174 | if ($dateIssued->length > 0) { |
@@ -191,8 +178,7 @@ discard block |
||
| 191 | 178 | return null; |
| 192 | 179 | } |
| 193 | 180 | |
| 194 | - public function removeDateIssued() |
|
| 195 | - { |
|
| 181 | + public function removeDateIssued() { |
|
| 196 | 182 | |
| 197 | 183 | $dateIssued = $this->getModsXpath()->query('/mods:mods/mods:originInfo[@eventType="distribution"]/mods:dateIssued[@encoding="iso8601"][@keyDate="yes"]'); |
| 198 | 184 | if ($dateIssued->length > 0) { |
@@ -201,8 +187,7 @@ discard block |
||
| 201 | 187 | |
| 202 | 188 | } |
| 203 | 189 | |
| 204 | - public function hasQucosaUrn() |
|
| 205 | - { |
|
| 190 | + public function hasQucosaUrn() { |
|
| 206 | 191 | $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]'); |
| 207 | 192 | |
| 208 | 193 | $hasUrn = false; |
@@ -215,8 +200,7 @@ discard block |
||
| 215 | 200 | return $hasUrn; |
| 216 | 201 | } |
| 217 | 202 | |
| 218 | - public function getQucosaUrn() |
|
| 219 | - { |
|
| 203 | + public function getQucosaUrn() { |
|
| 220 | 204 | $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]'); |
| 221 | 205 | $urnList = ''; |
| 222 | 206 | |
@@ -228,8 +212,7 @@ discard block |
||
| 228 | 212 | return $urnList; |
| 229 | 213 | } |
| 230 | 214 | |
| 231 | - public function addQucosaUrn($urn) |
|
| 232 | - { |
|
| 215 | + public function addQucosaUrn($urn) { |
|
| 233 | 216 | $rootNode = $this->getModsXpath()->query('/mods:mods'); |
| 234 | 217 | |
| 235 | 218 | if ($rootNode->length == 1) { |
@@ -243,8 +226,7 @@ discard block |
||
| 243 | 226 | |
| 244 | 227 | } |
| 245 | 228 | |
| 246 | - public function clearAllUrn() |
|
| 247 | - { |
|
| 229 | + public function clearAllUrn() { |
|
| 248 | 230 | $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="urn"]'); |
| 249 | 231 | |
| 250 | 232 | foreach ($urnNodeList as $urnNode) { |
@@ -260,8 +242,7 @@ discard block |
||
| 260 | 242 | /** |
| 261 | 243 | * @return string |
| 262 | 244 | */ |
| 263 | - public function getSourceDetails() |
|
| 264 | - { |
|
| 245 | + public function getSourceDetails() { |
|
| 265 | 246 | $data = []; |
| 266 | 247 | |
| 267 | 248 | $dataNodes[] = $this->getModsXpath()->query('/mods:mods/mods:relatedItem[@type="original"]'); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @var \EWW\Dpf\Domain\Repository\MetadataObjectRepository |
| 24 | 24 | * @inject |
| 25 | 25 | */ |
| 26 | - protected $metadataObjectRepository = null; |
|
| 26 | + protected $metadataObjectRepository = NULL; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * metadatGroupRepository |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @var \EWW\Dpf\Domain\Repository\MetadataGroupRepository |
| 32 | 32 | * @inject |
| 33 | 33 | */ |
| 34 | - protected $metadataGroupRepository = null; |
|
| 34 | + protected $metadataGroupRepository = NULL; |
|
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | protected $modsDom; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | return $year->item(0)->nodeValue; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - return null; |
|
| 170 | + return NULL; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | public function getOriginalSourceTitle() |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | return $node->item(0)->nodeValue; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - return null; |
|
| 180 | + return NULL; |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | public function getDateIssued() |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | return $dateIssued->item(0)->nodeValue; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - return null; |
|
| 191 | + return NULL; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | public function removeDateIssued() |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | { |
| 206 | 206 | $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]'); |
| 207 | 207 | |
| 208 | - $hasUrn = false; |
|
| 208 | + $hasUrn = FALSE; |
|
| 209 | 209 | |
| 210 | 210 | foreach ($urnNodeList as $urnNode) { |
| 211 | 211 | $value = $urnNode->nodeValue; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $urnNodeList = $this->getModsXpath()->query('/mods:mods/mods:identifier[@type="qucosa:urn"]'); |
| 221 | 221 | $urnList = ''; |
| 222 | 222 | |
| 223 | - if ($urnNodeList != null) { |
|
| 223 | + if ($urnNodeList != NULL) { |
|
| 224 | 224 | foreach ($urnNodeList as $urnNode) { |
| 225 | 225 | $urnList = $urnNode->nodeValue; |
| 226 | 226 | } |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace EWW\Dpf\Domain\Repository; |
| 3 | 3 | |
| 4 | -class StoredSearchRepository extends \TYPO3\CMS\Extbase\Persistence\Repository |
|
| 5 | -{ |
|
| 4 | +class StoredSearchRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { |
|
| 6 | 5 | } |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Frontend user |
| 21 | 21 | */ |
| 22 | -class FrontendUser extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser |
|
| 23 | -{ |
|
| 22 | +class FrontendUser extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser { |
|
| 24 | 23 | /** |
| 25 | 24 | * storedSearches |
| 26 | 25 | * |
@@ -40,8 +39,7 @@ discard block |
||
| 40 | 39 | /** |
| 41 | 40 | * __construct |
| 42 | 41 | */ |
| 43 | - public function __construct() |
|
| 44 | - { |
|
| 42 | + public function __construct() { |
|
| 45 | 43 | parent::__construct(); |
| 46 | 44 | |
| 47 | 45 | //Do not remove the next line: It would break the functionality |
@@ -53,8 +51,7 @@ discard block |
||
| 53 | 51 | * |
| 54 | 52 | * @return void |
| 55 | 53 | */ |
| 56 | - protected function initStorageObjects() |
|
| 57 | - { |
|
| 54 | + protected function initStorageObjects() { |
|
| 58 | 55 | $this->storedSearches = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); |
| 59 | 56 | } |
| 60 | 57 | |
@@ -64,8 +61,7 @@ discard block |
||
| 64 | 61 | * |
| 65 | 62 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\StoredSearch> |
| 66 | 63 | */ |
| 67 | - public function getStoredSearches() |
|
| 68 | - { |
|
| 64 | + public function getStoredSearches() { |
|
| 69 | 65 | return $this->storedSearches; |
| 70 | 66 | } |
| 71 | 67 | |
@@ -75,16 +71,14 @@ discard block |
||
| 75 | 71 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\StoredSearch> $storedSearches |
| 76 | 72 | * @return void |
| 77 | 73 | */ |
| 78 | - public function setStoredSearches(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $storedSearches) |
|
| 79 | - { |
|
| 74 | + public function setStoredSearches(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $storedSearches) { |
|
| 80 | 75 | $this->storedSearches = $storedSearches; |
| 81 | 76 | } |
| 82 | 77 | |
| 83 | 78 | /** |
| 84 | 79 | * @param \EWW\Dpf\Domain\Model\StoredSearch $storedSearch |
| 85 | 80 | */ |
| 86 | - public function addStoredSearch(\EWW\Dpf\Domain\Model\StoredSearch $storedSearch) |
|
| 87 | - { |
|
| 81 | + public function addStoredSearch(\EWW\Dpf\Domain\Model\StoredSearch $storedSearch) { |
|
| 88 | 82 | $this->storedSearches->attach($storedSearch); |
| 89 | 83 | } |
| 90 | 84 | |
@@ -93,8 +87,7 @@ discard block |
||
| 93 | 87 | * |
| 94 | 88 | * @return string |
| 95 | 89 | */ |
| 96 | - public function getUserRole() |
|
| 97 | - { |
|
| 90 | + public function getUserRole() { |
|
| 98 | 91 | // Get frontend user groups of the client. |
| 99 | 92 | $clientFrontendGroups = array(); |
| 100 | 93 | foreach ($this->frontendUserGroupRepository->findAll() as $clientGroup) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\StoredSearch> |
| 28 | 28 | * @cascade remove |
| 29 | 29 | */ |
| 30 | - protected $storedSearches = null; |
|
| 30 | + protected $storedSearches = NULL; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * frontendUserGroupRepository |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @var \EWW\Dpf\Domain\Repository\FrontendUserGroupRepository |
| 36 | 36 | * @inject |
| 37 | 37 | */ |
| 38 | - protected $frontendUserGroupRepository = null; |
|
| 38 | + protected $frontendUserGroupRepository = NULL; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * __construct |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | public function setObjectIdentifier($objectIdentifier) |
| 325 | 325 | { |
| 326 | 326 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 327 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 327 | + $this->objectIdentifier = empty($objectIdentifier) ? null : $objectIdentifier; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -506,14 +506,14 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 508 | 508 | |
| 509 | - $files = array(); |
|
| 509 | + $files = array (); |
|
| 510 | 510 | |
| 511 | 511 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 512 | 512 | foreach ($this->getFile() as $file) { |
| 513 | 513 | |
| 514 | 514 | if (!$file->isFileGroupDeleted()) { |
| 515 | 515 | |
| 516 | - $tmpFile = array( |
|
| 516 | + $tmpFile = array ( |
|
| 517 | 517 | 'path' => $file->getLink(), |
| 518 | 518 | 'type' => $file->getContentType(), |
| 519 | 519 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -557,12 +557,12 @@ discard block |
||
| 557 | 557 | |
| 558 | 558 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 559 | 559 | |
| 560 | - $files = array(); |
|
| 560 | + $files = array (); |
|
| 561 | 561 | |
| 562 | 562 | if (is_a($this->getFile(), '\TYPO3\CMS\Extbase\Persistence\ObjectStorage')) { |
| 563 | 563 | foreach ($this->getFile() as $file) { |
| 564 | 564 | |
| 565 | - $tmpFile = array( |
|
| 565 | + $tmpFile = array ( |
|
| 566 | 566 | 'path' => $file->getLink(), |
| 567 | 567 | 'type' => $file->getContentType(), |
| 568 | 568 | 'title' => (($file->getLabel()) ? $file->getLabel() : $file->getTitle()), |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | */ |
| 716 | 716 | public function getCreator() |
| 717 | 717 | { |
| 718 | - return $this->creator? $this->creator : 0; |
|
| 718 | + return $this->creator ? $this->creator : 0; |
|
| 719 | 719 | } |
| 720 | 720 | |
| 721 | 721 | /** |
@@ -861,7 +861,7 @@ discard block |
||
| 861 | 861 | |
| 862 | 862 | foreach ($availableProperties as $propertyName) { |
| 863 | 863 | if (\TYPO3\CMS\Extbase\Reflection\ObjectAccess::isPropertySettable($newDocument, $propertyName) |
| 864 | - && !in_array($propertyName, array('uid','pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 864 | + && !in_array($propertyName, array ('uid', 'pid', 'file', 'comment', 'linkedUid', 'suggestion', 'creator'))) { |
|
| 865 | 865 | |
| 866 | 866 | $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($documentToCopy, $propertyName); |
| 867 | 867 | \TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty($newDocument, $propertyName, $propertyValue); |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | */ |
| 884 | 884 | public function getDocumentIdentifier() |
| 885 | 885 | { |
| 886 | - return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
|
| 886 | + return $this->getObjectIdentifier() ? $this->getObjectIdentifier() : $this->getUid(); |
|
| 887 | 887 | } |
| 888 | 888 | |
| 889 | 889 | /** |
@@ -916,8 +916,8 @@ discard block |
||
| 916 | 916 | public function getPublicationYear() |
| 917 | 917 | { |
| 918 | 918 | $mods = new Mods($this->getXmlData()); |
| 919 | - $year = $mods->getPublishingYear(); |
|
| 920 | - return $year? $year : ""; |
|
| 919 | + $year = $mods->getPublishingYear(); |
|
| 920 | + return $year ? $year : ""; |
|
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | /** |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | { |
| 930 | 930 | $mods = new Mods($this->getXmlData()); |
| 931 | 931 | $title = $mods->getTitle(); |
| 932 | - return $title? $title : ""; |
|
| 932 | + return $title ? $title : ""; |
|
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Document |
| 22 | 22 | */ |
| 23 | -class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
|
| 24 | -{ |
|
| 23 | +class Document extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { |
|
| 25 | 24 | /** |
| 26 | 25 | * title |
| 27 | 26 | * |
@@ -183,8 +182,7 @@ discard block |
||
| 183 | 182 | /** |
| 184 | 183 | * __construct |
| 185 | 184 | */ |
| 186 | - public function __construct() |
|
| 187 | - { |
|
| 185 | + public function __construct() { |
|
| 188 | 186 | //Do not remove the next line: It would break the functionality |
| 189 | 187 | $this->initStorageObjects(); |
| 190 | 188 | } |
@@ -194,8 +192,7 @@ discard block |
||
| 194 | 192 | * |
| 195 | 193 | * @return void |
| 196 | 194 | */ |
| 197 | - protected function initStorageObjects() |
|
| 198 | - { |
|
| 195 | + protected function initStorageObjects() { |
|
| 199 | 196 | $this->file = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); |
| 200 | 197 | } |
| 201 | 198 | |
@@ -204,8 +201,7 @@ discard block |
||
| 204 | 201 | * |
| 205 | 202 | * @return string $title |
| 206 | 203 | */ |
| 207 | - public function getTitle() |
|
| 208 | - { |
|
| 204 | + public function getTitle() { |
|
| 209 | 205 | return $this->title; |
| 210 | 206 | } |
| 211 | 207 | |
@@ -215,8 +211,7 @@ discard block |
||
| 215 | 211 | * @param string $title |
| 216 | 212 | * @return void |
| 217 | 213 | */ |
| 218 | - public function setTitle($title) |
|
| 219 | - { |
|
| 214 | + public function setTitle($title) { |
|
| 220 | 215 | $this->title = $title; |
| 221 | 216 | //htmlspecialchars_decode($title,ENT_QUOTES); |
| 222 | 217 | } |
@@ -226,8 +221,7 @@ discard block |
||
| 226 | 221 | * |
| 227 | 222 | * @return array $authors |
| 228 | 223 | */ |
| 229 | - public function getAuthors() |
|
| 230 | - { |
|
| 224 | + public function getAuthors() { |
|
| 231 | 225 | return array_map('trim', explode(";", $this->authors)); |
| 232 | 226 | } |
| 233 | 227 | |
@@ -237,8 +231,7 @@ discard block |
||
| 237 | 231 | * @param array $authors |
| 238 | 232 | * @return void |
| 239 | 233 | */ |
| 240 | - public function setAuthors($authors) |
|
| 241 | - { |
|
| 234 | + public function setAuthors($authors) { |
|
| 242 | 235 | $authors = implode("; ", $authors); |
| 243 | 236 | $this->authors = $authors; |
| 244 | 237 | } |
@@ -248,8 +241,7 @@ discard block |
||
| 248 | 241 | * |
| 249 | 242 | * @return string $xmlData |
| 250 | 243 | */ |
| 251 | - public function getXmlData() |
|
| 252 | - { |
|
| 244 | + public function getXmlData() { |
|
| 253 | 245 | return $this->xmlData; |
| 254 | 246 | } |
| 255 | 247 | |
@@ -259,8 +251,7 @@ discard block |
||
| 259 | 251 | * @param string $xmlData |
| 260 | 252 | * @return void |
| 261 | 253 | */ |
| 262 | - public function setXmlData($xmlData) |
|
| 263 | - { |
|
| 254 | + public function setXmlData($xmlData) { |
|
| 264 | 255 | $this->xmlData = $xmlData; |
| 265 | 256 | } |
| 266 | 257 | |
@@ -269,8 +260,7 @@ discard block |
||
| 269 | 260 | * |
| 270 | 261 | * @return string $slubInfoData |
| 271 | 262 | */ |
| 272 | - public function getSlubInfoData() |
|
| 273 | - { |
|
| 263 | + public function getSlubInfoData() { |
|
| 274 | 264 | return $this->slubInfoData; |
| 275 | 265 | } |
| 276 | 266 | |
@@ -279,8 +269,7 @@ discard block |
||
| 279 | 269 | * |
| 280 | 270 | * @return string $slubInfoData |
| 281 | 271 | */ |
| 282 | - public function setSlubInfoData($slubInfoData) |
|
| 283 | - { |
|
| 272 | + public function setSlubInfoData($slubInfoData) { |
|
| 284 | 273 | $this->slubInfoData = $slubInfoData; |
| 285 | 274 | } |
| 286 | 275 | |
@@ -289,8 +278,7 @@ discard block |
||
| 289 | 278 | * |
| 290 | 279 | * @return \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 291 | 280 | */ |
| 292 | - public function getDocumentType() |
|
| 293 | - { |
|
| 281 | + public function getDocumentType() { |
|
| 294 | 282 | return $this->documentType; |
| 295 | 283 | } |
| 296 | 284 | |
@@ -300,8 +288,7 @@ discard block |
||
| 300 | 288 | * @param \EWW\Dpf\Domain\Model\DocumentType $documentType |
| 301 | 289 | * @return void |
| 302 | 290 | */ |
| 303 | - public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) |
|
| 304 | - { |
|
| 291 | + public function setDocumentType(\EWW\Dpf\Domain\Model\DocumentType $documentType) { |
|
| 305 | 292 | $this->documentType = $documentType; |
| 306 | 293 | } |
| 307 | 294 | |
@@ -310,8 +297,7 @@ discard block |
||
| 310 | 297 | * |
| 311 | 298 | * @return string |
| 312 | 299 | */ |
| 313 | - public function getObjectIdentifier() |
|
| 314 | - { |
|
| 300 | + public function getObjectIdentifier() { |
|
| 315 | 301 | return $this->objectIdentifier; |
| 316 | 302 | } |
| 317 | 303 | |
@@ -321,8 +307,7 @@ discard block |
||
| 321 | 307 | * @param string $objectIdentifier |
| 322 | 308 | * @return void |
| 323 | 309 | */ |
| 324 | - public function setObjectIdentifier($objectIdentifier) |
|
| 325 | - { |
|
| 310 | + public function setObjectIdentifier($objectIdentifier) { |
|
| 326 | 311 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 327 | 312 | $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
| 328 | 313 | } |
@@ -332,8 +317,7 @@ discard block |
||
| 332 | 317 | * |
| 333 | 318 | * @return string |
| 334 | 319 | */ |
| 335 | - public function getReservedObjectIdentifier() |
|
| 336 | - { |
|
| 320 | + public function getReservedObjectIdentifier() { |
|
| 337 | 321 | return $this->reservedObjectIdentifier; |
| 338 | 322 | } |
| 339 | 323 | |
@@ -343,8 +327,7 @@ discard block |
||
| 343 | 327 | * @param string $reservedObjectIdentifier |
| 344 | 328 | * @return void |
| 345 | 329 | */ |
| 346 | - public function setReservedObjectIdentifier($reservedObjectIdentifier) |
|
| 347 | - { |
|
| 330 | + public function setReservedObjectIdentifier($reservedObjectIdentifier) { |
|
| 348 | 331 | $this->reservedObjectIdentifier = $reservedObjectIdentifier; |
| 349 | 332 | } |
| 350 | 333 | |
@@ -353,8 +336,7 @@ discard block |
||
| 353 | 336 | * |
| 354 | 337 | * @return string |
| 355 | 338 | */ |
| 356 | - public function getTransferStatus() |
|
| 357 | - { |
|
| 339 | + public function getTransferStatus() { |
|
| 358 | 340 | return $this->transferStatus; |
| 359 | 341 | } |
| 360 | 342 | |
@@ -364,8 +346,7 @@ discard block |
||
| 364 | 346 | * @param string |
| 365 | 347 | * @return void |
| 366 | 348 | */ |
| 367 | - public function setTransferStatus($transferStatus) |
|
| 368 | - { |
|
| 349 | + public function setTransferStatus($transferStatus) { |
|
| 369 | 350 | $this->transferStatus = $transferStatus; |
| 370 | 351 | } |
| 371 | 352 | |
@@ -374,8 +355,7 @@ discard block |
||
| 374 | 355 | * |
| 375 | 356 | * @return integer |
| 376 | 357 | */ |
| 377 | - public function getTransferDate() |
|
| 378 | - { |
|
| 358 | + public function getTransferDate() { |
|
| 379 | 359 | return $this->transferDate; |
| 380 | 360 | } |
| 381 | 361 | |
@@ -385,8 +365,7 @@ discard block |
||
| 385 | 365 | * @param integer $transferDate |
| 386 | 366 | * @return void |
| 387 | 367 | */ |
| 388 | - public function setTransferDate($transferDate) |
|
| 389 | - { |
|
| 368 | + public function setTransferDate($transferDate) { |
|
| 390 | 369 | $this->transferDate = $transferDate; |
| 391 | 370 | } |
| 392 | 371 | |
@@ -395,8 +374,7 @@ discard block |
||
| 395 | 374 | * |
| 396 | 375 | * @var integer |
| 397 | 376 | */ |
| 398 | - public function getTransferErrorCode() |
|
| 399 | - { |
|
| 377 | + public function getTransferErrorCode() { |
|
| 400 | 378 | return $this->transferErrorCode; |
| 401 | 379 | } |
| 402 | 380 | |
@@ -406,8 +384,7 @@ discard block |
||
| 406 | 384 | * @param integer $transferErrorCode |
| 407 | 385 | * @return void |
| 408 | 386 | */ |
| 409 | - public function setTransferErrorCode($transferErrorCode) |
|
| 410 | - { |
|
| 387 | + public function setTransferErrorCode($transferErrorCode) { |
|
| 411 | 388 | $this->transferErrorCode = $transferErrorCode; |
| 412 | 389 | } |
| 413 | 390 | |
@@ -416,8 +393,7 @@ discard block |
||
| 416 | 393 | * |
| 417 | 394 | * @var string |
| 418 | 395 | */ |
| 419 | - public function getTransferResponse() |
|
| 420 | - { |
|
| 396 | + public function getTransferResponse() { |
|
| 421 | 397 | return $this->transferResponse; |
| 422 | 398 | } |
| 423 | 399 | |
@@ -427,8 +403,7 @@ discard block |
||
| 427 | 403 | * @param string $transferResponse |
| 428 | 404 | * @return void |
| 429 | 405 | */ |
| 430 | - public function setTransferResponse($transferResponse) |
|
| 431 | - { |
|
| 406 | + public function setTransferResponse($transferResponse) { |
|
| 432 | 407 | $this->transferResponse = $transferResponse; |
| 433 | 408 | } |
| 434 | 409 | |
@@ -437,8 +412,7 @@ discard block |
||
| 437 | 412 | * |
| 438 | 413 | * @var integer |
| 439 | 414 | */ |
| 440 | - public function getTransferHttpStatus() |
|
| 441 | - { |
|
| 415 | + public function getTransferHttpStatus() { |
|
| 442 | 416 | return $this->transferHttpStatus; |
| 443 | 417 | } |
| 444 | 418 | |
@@ -448,8 +422,7 @@ discard block |
||
| 448 | 422 | * @param integer $transferHttpStatus |
| 449 | 423 | * @return void |
| 450 | 424 | */ |
| 451 | - public function setTransferHttpStatus($transferHttpStatus) |
|
| 452 | - { |
|
| 425 | + public function setTransferHttpStatus($transferHttpStatus) { |
|
| 453 | 426 | $this->transferHttpStatus = $transferHttpStatus; |
| 454 | 427 | } |
| 455 | 428 | |
@@ -459,8 +432,7 @@ discard block |
||
| 459 | 432 | * @param \EWW\Dpf\Domain\Model\File $file |
| 460 | 433 | * @return void |
| 461 | 434 | */ |
| 462 | - public function addFile(\EWW\Dpf\Domain\Model\File $file) |
|
| 463 | - { |
|
| 435 | + public function addFile(\EWW\Dpf\Domain\Model\File $file) { |
|
| 464 | 436 | $this->file->attach($file); |
| 465 | 437 | } |
| 466 | 438 | |
@@ -470,8 +442,7 @@ discard block |
||
| 470 | 442 | * @param \EWW\Dpf\Domain\Model\File $fileToRemove The File to be removed |
| 471 | 443 | * @return void |
| 472 | 444 | */ |
| 473 | - public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) |
|
| 474 | - { |
|
| 445 | + public function removeFile(\EWW\Dpf\Domain\Model\File $fileToRemove) { |
|
| 475 | 446 | $this->file->detach($fileToRemove); |
| 476 | 447 | } |
| 477 | 448 | |
@@ -480,8 +451,7 @@ discard block |
||
| 480 | 451 | * |
| 481 | 452 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file |
| 482 | 453 | */ |
| 483 | - public function getFile() |
|
| 484 | - { |
|
| 454 | + public function getFile() { |
|
| 485 | 455 | return $this->file; |
| 486 | 456 | } |
| 487 | 457 | |
@@ -491,8 +461,7 @@ discard block |
||
| 491 | 461 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> $file |
| 492 | 462 | * @return void |
| 493 | 463 | */ |
| 494 | - public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) |
|
| 495 | - { |
|
| 464 | + public function setFile(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $file) { |
|
| 496 | 465 | $this->file = $file; |
| 497 | 466 | } |
| 498 | 467 | |
@@ -501,8 +470,7 @@ discard block |
||
| 501 | 470 | * |
| 502 | 471 | * @return array |
| 503 | 472 | */ |
| 504 | - public function getFileData() |
|
| 505 | - { |
|
| 473 | + public function getFileData() { |
|
| 506 | 474 | |
| 507 | 475 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 508 | 476 | |
@@ -552,8 +520,7 @@ discard block |
||
| 552 | 520 | * |
| 553 | 521 | * @return array |
| 554 | 522 | */ |
| 555 | - public function getCurrentFileData() |
|
| 556 | - { |
|
| 523 | + public function getCurrentFileData() { |
|
| 557 | 524 | |
| 558 | 525 | $fileId = new \EWW\Dpf\Services\Transfer\FileId($this); |
| 559 | 526 | |
@@ -601,8 +568,7 @@ discard block |
||
| 601 | 568 | * |
| 602 | 569 | * @return boolean $changed |
| 603 | 570 | */ |
| 604 | - public function getChanged() |
|
| 605 | - { |
|
| 571 | + public function getChanged() { |
|
| 606 | 572 | return $this->changed; |
| 607 | 573 | } |
| 608 | 574 | |
@@ -612,8 +578,7 @@ discard block |
||
| 612 | 578 | * @param boolean $changed |
| 613 | 579 | * @return void |
| 614 | 580 | */ |
| 615 | - public function setChanged($changed) |
|
| 616 | - { |
|
| 581 | + public function setChanged($changed) { |
|
| 617 | 582 | $this->changed = $changed; |
| 618 | 583 | } |
| 619 | 584 | |
@@ -622,8 +587,7 @@ discard block |
||
| 622 | 587 | * |
| 623 | 588 | * @return boolean $valid |
| 624 | 589 | */ |
| 625 | - public function getValid() |
|
| 626 | - { |
|
| 590 | + public function getValid() { |
|
| 627 | 591 | return $this->valid; |
| 628 | 592 | } |
| 629 | 593 | |
@@ -633,8 +597,7 @@ discard block |
||
| 633 | 597 | * @param boolean $valid |
| 634 | 598 | * @return void |
| 635 | 599 | */ |
| 636 | - public function setValid($valid) |
|
| 637 | - { |
|
| 600 | + public function setValid($valid) { |
|
| 638 | 601 | $this->valid = $valid; |
| 639 | 602 | } |
| 640 | 603 | |
@@ -643,8 +606,7 @@ discard block |
||
| 643 | 606 | * |
| 644 | 607 | * @return string |
| 645 | 608 | */ |
| 646 | - public function getDateIssued() |
|
| 647 | - { |
|
| 609 | + public function getDateIssued() { |
|
| 648 | 610 | return empty($this->dateIssued) ? '' : $this->dateIssued; |
| 649 | 611 | } |
| 650 | 612 | |
@@ -654,8 +616,7 @@ discard block |
||
| 654 | 616 | * @param string $dateIssued |
| 655 | 617 | * @return void |
| 656 | 618 | */ |
| 657 | - public function setDateIssued($dateIssued) |
|
| 658 | - { |
|
| 619 | + public function setDateIssued($dateIssued) { |
|
| 659 | 620 | $this->dateIssued = empty($dateIssued) ? '' : $dateIssued; |
| 660 | 621 | } |
| 661 | 622 | |
@@ -665,8 +626,7 @@ discard block |
||
| 665 | 626 | * |
| 666 | 627 | * @return string |
| 667 | 628 | */ |
| 668 | - public function getProcessNumber() |
|
| 669 | - { |
|
| 629 | + public function getProcessNumber() { |
|
| 670 | 630 | return $this->processNumber; |
| 671 | 631 | } |
| 672 | 632 | |
@@ -676,8 +636,7 @@ discard block |
||
| 676 | 636 | * @param string $processNumber |
| 677 | 637 | * @return void |
| 678 | 638 | */ |
| 679 | - public function setProcessNumber($processNumber) |
|
| 680 | - { |
|
| 639 | + public function setProcessNumber($processNumber) { |
|
| 681 | 640 | $this->processNumber = trim($processNumber); |
| 682 | 641 | } |
| 683 | 642 | |
@@ -687,8 +646,7 @@ discard block |
||
| 687 | 646 | * |
| 688 | 647 | * @return string |
| 689 | 648 | */ |
| 690 | - public function getSubmitterName() |
|
| 691 | - { |
|
| 649 | + public function getSubmitterName() { |
|
| 692 | 650 | try { |
| 693 | 651 | $slub = new \EWW\Dpf\Helper\Slub($this->getSlubInfoData()); |
| 694 | 652 | return $slub->getSubmitterName(); |
@@ -702,8 +660,7 @@ discard block |
||
| 702 | 660 | * |
| 703 | 661 | * @return string |
| 704 | 662 | */ |
| 705 | - public function getQucosaUrn() |
|
| 706 | - { |
|
| 663 | + public function getQucosaUrn() { |
|
| 707 | 664 | $mods = new \EWW\Dpf\Helper\Mods($this->getXmlData()); |
| 708 | 665 | return $mods->getQucosaUrn(); |
| 709 | 666 | } |
@@ -713,8 +670,7 @@ discard block |
||
| 713 | 670 | * |
| 714 | 671 | * @return int |
| 715 | 672 | */ |
| 716 | - public function getCreator() |
|
| 717 | - { |
|
| 673 | + public function getCreator() { |
|
| 718 | 674 | return $this->creator? $this->creator : 0; |
| 719 | 675 | } |
| 720 | 676 | |
@@ -724,23 +680,19 @@ discard block |
||
| 724 | 680 | * @param int $creator |
| 725 | 681 | * @return void |
| 726 | 682 | */ |
| 727 | - public function setCreator($creator) |
|
| 728 | - { |
|
| 683 | + public function setCreator($creator) { |
|
| 729 | 684 | $this->creator = $creator; |
| 730 | 685 | } |
| 731 | 686 | |
| 732 | - public function getState() |
|
| 733 | - { |
|
| 687 | + public function getState() { |
|
| 734 | 688 | return $this->state; |
| 735 | 689 | } |
| 736 | 690 | |
| 737 | - public function setState($state) |
|
| 738 | - { |
|
| 691 | + public function setState($state) { |
|
| 739 | 692 | $this->state = $state; |
| 740 | 693 | } |
| 741 | 694 | |
| 742 | - public function getRemoteState() |
|
| 743 | - { |
|
| 695 | + public function getRemoteState() { |
|
| 744 | 696 | $state = explode(':', $this->state); |
| 745 | 697 | if (is_array($state) && array_key_exists(1, $state)) { |
| 746 | 698 | return $state[1]; |
@@ -778,8 +730,7 @@ discard block |
||
| 778 | 730 | /** |
| 779 | 731 | * @return string |
| 780 | 732 | */ |
| 781 | - public function getRemoteLastModDate() |
|
| 782 | - { |
|
| 733 | + public function getRemoteLastModDate() { |
|
| 783 | 734 | return $this->remoteLastModDate; |
| 784 | 735 | } |
| 785 | 736 | |
@@ -787,16 +738,14 @@ discard block |
||
| 787 | 738 | * @param string $remoteLastModDate |
| 788 | 739 | * @return void |
| 789 | 740 | */ |
| 790 | - public function setRemoteLastModDate($remoteLastModDate) |
|
| 791 | - { |
|
| 741 | + public function setRemoteLastModDate($remoteLastModDate) { |
|
| 792 | 742 | $this->remoteLastModDate = $remoteLastModDate; |
| 793 | 743 | } |
| 794 | 744 | |
| 795 | 745 | /** |
| 796 | 746 | * @return integer |
| 797 | 747 | */ |
| 798 | - public function getTstamp() |
|
| 799 | - { |
|
| 748 | + public function getTstamp() { |
|
| 800 | 749 | return $this->tstamp; |
| 801 | 750 | } |
| 802 | 751 | |
@@ -811,8 +760,7 @@ discard block |
||
| 811 | 760 | /** |
| 812 | 761 | * @param bool $suggestion |
| 813 | 762 | */ |
| 814 | - public function setSuggestion(bool $suggestion) |
|
| 815 | - { |
|
| 763 | + public function setSuggestion(bool $suggestion) { |
|
| 816 | 764 | $this->suggestion = $suggestion; |
| 817 | 765 | } |
| 818 | 766 | |
@@ -827,8 +775,7 @@ discard block |
||
| 827 | 775 | /** |
| 828 | 776 | * @param string $linkedUid |
| 829 | 777 | */ |
| 830 | - public function setLinkedUid(string $linkedUid) |
|
| 831 | - { |
|
| 778 | + public function setLinkedUid(string $linkedUid) { |
|
| 832 | 779 | $this->linkedUid = $linkedUid; |
| 833 | 780 | } |
| 834 | 781 | |
@@ -843,8 +790,7 @@ discard block |
||
| 843 | 790 | /** |
| 844 | 791 | * @param string $comment |
| 845 | 792 | */ |
| 846 | - public function setComment(string $comment) |
|
| 847 | - { |
|
| 793 | + public function setComment(string $comment) { |
|
| 848 | 794 | $this->comment = $comment; |
| 849 | 795 | } |
| 850 | 796 | |
@@ -881,8 +827,7 @@ discard block |
||
| 881 | 827 | * |
| 882 | 828 | * @return string|int |
| 883 | 829 | */ |
| 884 | - public function getDocumentIdentifier() |
|
| 885 | - { |
|
| 830 | + public function getDocumentIdentifier() { |
|
| 886 | 831 | return $this->getObjectIdentifier()? $this->getObjectIdentifier() : $this->getUid(); |
| 887 | 832 | } |
| 888 | 833 | |
@@ -891,8 +836,7 @@ discard block |
||
| 891 | 836 | * |
| 892 | 837 | * @return bool |
| 893 | 838 | */ |
| 894 | - public function isWorkingCopy() |
|
| 895 | - { |
|
| 839 | + public function isWorkingCopy() { |
|
| 896 | 840 | return $this->getObjectIdentifier() && !$this->isTemporary() && !$this->isSuggestion(); |
| 897 | 841 | } |
| 898 | 842 | |
@@ -902,8 +846,7 @@ discard block |
||
| 902 | 846 | * |
| 903 | 847 | * @return bool |
| 904 | 848 | */ |
| 905 | - public function isTemporaryCopy() |
|
| 906 | - { |
|
| 849 | + public function isTemporaryCopy() { |
|
| 907 | 850 | return $this->getObjectIdentifier() && $this->isTemporary() && !$this->isSuggestion(); |
| 908 | 851 | } |
| 909 | 852 | |
@@ -913,8 +856,7 @@ discard block |
||
| 913 | 856 | * |
| 914 | 857 | * @return string|null |
| 915 | 858 | */ |
| 916 | - public function getPublicationYear() |
|
| 917 | - { |
|
| 859 | + public function getPublicationYear() { |
|
| 918 | 860 | $mods = new Mods($this->getXmlData()); |
| 919 | 861 | $year = $mods->getPublishingYear(); |
| 920 | 862 | return $year? $year : ""; |
@@ -925,8 +867,7 @@ discard block |
||
| 925 | 867 | * |
| 926 | 868 | * @return string|null |
| 927 | 869 | */ |
| 928 | - public function getMainTitle() |
|
| 929 | - { |
|
| 870 | + public function getMainTitle() { |
|
| 930 | 871 | $mods = new Mods($this->getXmlData()); |
| 931 | 872 | $title = $mods->getTitle(); |
| 932 | 873 | return $title? $title : ""; |
@@ -938,8 +879,7 @@ discard block |
||
| 938 | 879 | * |
| 939 | 880 | * @return string|null |
| 940 | 881 | */ |
| 941 | - public function getSourceDetails() |
|
| 942 | - { |
|
| 882 | + public function getSourceDetails() { |
|
| 943 | 883 | $mods = new Mods($this->getXmlData()); |
| 944 | 884 | $data = $mods->getSourceDetails(); |
| 945 | 885 | return $data; |
@@ -956,8 +896,7 @@ discard block |
||
| 956 | 896 | /** |
| 957 | 897 | * @param \DateTime|null $embargoDate |
| 958 | 898 | */ |
| 959 | - public function setEmbargoDate(?\DateTime $embargoDate) |
|
| 960 | - { |
|
| 899 | + public function setEmbargoDate(?\DateTime $embargoDate) { |
|
| 961 | 900 | $this->embargoDate = $embargoDate; |
| 962 | 901 | } |
| 963 | 902 | |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | * |
| 56 | 56 | * @var \EWW\Dpf\Domain\Model\DocumentType |
| 57 | 57 | */ |
| 58 | - protected $documentType = null; |
|
| 58 | + protected $documentType = NULL; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * objectIdentifier |
| 62 | 62 | * |
| 63 | 63 | * @var string |
| 64 | 64 | */ |
| 65 | - protected $objectIdentifier = null; |
|
| 65 | + protected $objectIdentifier = NULL; |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * reservedObjectIdentifier |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @var boolean |
| 92 | 92 | */ |
| 93 | - protected $changed = false; |
|
| 93 | + protected $changed = FALSE; |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * valid |
| 97 | 97 | * |
| 98 | 98 | * @var boolean |
| 99 | 99 | */ |
| 100 | - protected $valid = false; |
|
| 100 | + protected $valid = FALSE; |
|
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | /** |
| 115 | 115 | * @var bool $suggestion |
| 116 | 116 | */ |
| 117 | - protected $suggestion = false; |
|
| 117 | + protected $suggestion = FALSE; |
|
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * creator |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * |
| 167 | 167 | * @var \DateTime |
| 168 | 168 | */ |
| 169 | - protected $embargoDate = null; |
|
| 169 | + protected $embargoDate = NULL; |
|
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | 172 | * file |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EWW\Dpf\Domain\Model\File> |
| 175 | 175 | * @cascade remove |
| 176 | 176 | */ |
| 177 | - protected $file = null; |
|
| 177 | + protected $file = NULL; |
|
| 178 | 178 | |
| 179 | 179 | const TRANSFER_ERROR = "ERROR"; |
| 180 | 180 | const TRANSFER_QUEUED = "QUEUED"; |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | public function setObjectIdentifier($objectIdentifier) |
| 325 | 325 | { |
| 326 | 326 | // Due to uniqe key uc_object_identifier, which should ignore empty object identifiers. |
| 327 | - $this->objectIdentifier = empty($objectIdentifier)? null : $objectIdentifier; |
|
| 327 | + $this->objectIdentifier = empty($objectIdentifier)? NULL : $objectIdentifier; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | /** |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | 'download' => $file->getDownload(), |
| 521 | 521 | 'archive' => $file->getArchive(), |
| 522 | 522 | 'use' => '', |
| 523 | - 'id' => null, |
|
| 523 | + 'id' => NULL, |
|
| 524 | 524 | 'hasFLocat' => ($file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_ADDED || |
| 525 | 525 | $file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_CHANGED), |
| 526 | 526 | ); |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | 'download' => $file->getDownload(), |
| 570 | 570 | 'archive' => $file->getArchive(), |
| 571 | 571 | 'use' => '', |
| 572 | - 'id' => null, |
|
| 572 | + 'id' => NULL, |
|
| 573 | 573 | 'hasFLocat' => ($file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_ADDED || |
| 574 | 574 | $file->getStatus() == \EWW\Dpf\Domain\Model\File::STATUS_CHANGED), |
| 575 | 575 | ); |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * StoredSearch |
| 19 | 19 | */ |
| 20 | -class StoredSearch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
|
| 21 | -{ |
|
| 20 | +class StoredSearch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { |
|
| 22 | 21 | |
| 23 | 22 | /** |
| 24 | 23 | * name |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | * |
| 43 | 42 | * @return string $name |
| 44 | 43 | */ |
| 45 | - public function getName() |
|
| 46 | - { |
|
| 44 | + public function getName() { |
|
| 47 | 45 | return $this->name; |
| 48 | 46 | } |
| 49 | 47 | |
@@ -53,8 +51,7 @@ discard block |
||
| 53 | 51 | * @param string $name |
| 54 | 52 | * @return void |
| 55 | 53 | */ |
| 56 | - public function setName($name) |
|
| 57 | - { |
|
| 54 | + public function setName($name) { |
|
| 58 | 55 | $this->name = $name; |
| 59 | 56 | } |
| 60 | 57 | |
@@ -64,8 +61,7 @@ discard block |
||
| 64 | 61 | * |
| 65 | 62 | * @return string $query |
| 66 | 63 | */ |
| 67 | - public function getQuery() |
|
| 68 | - { |
|
| 64 | + public function getQuery() { |
|
| 69 | 65 | return $this->query; |
| 70 | 66 | } |
| 71 | 67 | |
@@ -76,8 +72,7 @@ discard block |
||
| 76 | 72 | * @param string $query |
| 77 | 73 | * @return void |
| 78 | 74 | */ |
| 79 | - public function setQuery($query) |
|
| 80 | - { |
|
| 75 | + public function setQuery($query) { |
|
| 81 | 76 | $this->query = $query; |
| 82 | 77 | } |
| 83 | 78 | |