@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | if (isset($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE])) { |
| 80 | 80 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], $request::$get[CmsComponent::GET_PARAMETER_PATH])) { |
| 81 | 81 | $cmsComponent->storage->getDocuments()->addDocument($request::$post); |
| 82 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 82 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 83 | 83 | exit; |
| 84 | 84 | } |
| 85 | 85 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPE, $cmsComponent->storage->getDocumentTypes()->getDocumentTypeBySlug($request::$get[CmsComponent::PARAMETER_DOCUMENT_TYPE], true)); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } else { |
| 88 | 88 | $documentTypes = $cmsComponent->storage->getDocumentTypes()->getDocumentTypes(); |
| 89 | 89 | if (count($documentTypes) < 1) { |
| 90 | - throw new \Exception('No Document Types defined yet. <a href="' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/configuration/document-types/new">Please do so first.</a>'); |
|
| 90 | + throw new \Exception('No Document Types defined yet. <a href="'.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/configuration/document-types/new">Please do so first.</a>'); |
|
| 91 | 91 | } |
| 92 | 92 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT_TYPES, $documentTypes); |
| 93 | 93 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $cmsComponent->setParameter(CmsComponent::PARAMETER_SMALLEST_IMAGE, $cmsComponent->storage->getImageSet()->getSmallestImageSet()->slug); |
| 105 | 105 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$get[CmsComponent::GET_PARAMETER_SLUG])) { |
| 106 | 106 | $cmsComponent->storage->getDocuments()->saveDocument($request::$post); |
| 107 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 107 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 108 | 108 | exit; |
| 109 | 109 | } |
| 110 | 110 | $cmsComponent->setParameter(CmsComponent::PARAMETER_DOCUMENT, $cmsComponent->storage->getDocuments()->getDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG])); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | private function deleteDocumentRoute($request, $cmsComponent) |
| 142 | 142 | { |
| 143 | 143 | $cmsComponent->storage->getDocuments()->deleteDocumentBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 144 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 144 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 145 | 145 | exit; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $cmsComponent->setParameter(CmsComponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_DOCUMENTS); |
| 156 | 156 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post[CmsComponent::GET_PARAMETER_PATH])) { |
| 157 | 157 | $cmsComponent->storage->addDocumentFolder($request::$post); |
| 158 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 158 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 159 | 159 | exit; |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -174,11 +174,11 @@ discard block |
||
| 174 | 174 | array_pop($path); |
| 175 | 175 | $path = implode('/', $path); |
| 176 | 176 | |
| 177 | - $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/' . $path; |
|
| 177 | + $request::$get[CmsComponent::GET_PARAMETER_PATH] = '/'.$path; |
|
| 178 | 178 | |
| 179 | 179 | if (isset($request::$post[CmsComponent::POST_PARAMETER_TITLE], $request::$post['content'])) { |
| 180 | 180 | $cmsComponent->storage->saveDocumentFolder($request::$post); |
| 181 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 181 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 182 | 182 | exit; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | private function deleteFolderRoute($request, $cmsComponent) |
| 194 | 194 | { |
| 195 | 195 | $cmsComponent->storage->deleteDocumentFolderBySlug($request::$get[CmsComponent::GET_PARAMETER_SLUG]); |
| 196 | - header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX) . '/documents'); |
|
| 196 | + header('Location: '.$request::$subfolders.$cmsComponent->getParameter(CmsComponent::PARAMETER_CMS_PREFIX).'/documents'); |
|
| 197 | 197 | exit; |
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | \ No newline at end of file |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function getDocumentBySlug($slug) |
| 37 | 37 | { |
| 38 | - $path = '/' . $slug; |
|
| 38 | + $path = '/'.$slug; |
|
| 39 | 39 | |
| 40 | 40 | return $this->repository->getDocumentByPath($path); |
| 41 | 41 | } |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function saveDocument($postValues) |
| 47 | 47 | { |
| 48 | - $oldPath = '/' . $postValues['path']; |
|
| 48 | + $oldPath = '/'.$postValues['path']; |
|
| 49 | 49 | |
| 50 | 50 | $container = $this->getDocumentContainerByPath($oldPath); |
| 51 | 51 | $documentObject = DocumentFactory::createDocumentFromPostValues($postValues, new DocumentTypesStorage($this->repository)); |
| 52 | 52 | if ($container->path === '/') { |
| 53 | - $newPath = $container->path . $documentObject->slug; |
|
| 53 | + $newPath = $container->path.$documentObject->slug; |
|
| 54 | 54 | } else { |
| 55 | - $newPath = $container->path . '/' . $documentObject->slug; |
|
| 55 | + $newPath = $container->path.'/'.$documentObject->slug; |
|
| 56 | 56 | } |
| 57 | 57 | $documentObject->path = $newPath; |
| 58 | 58 | $this->repository->saveDocument($documentObject); |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $documentObject = DocumentFactory::createDocumentFromPostValues($postValues, new DocumentTypesStorage($this->repository)); |
| 67 | 67 | if ($postValues['path'] === '/') { |
| 68 | - $documentObject->path = $postValues['path'] . $documentObject->slug; |
|
| 68 | + $documentObject->path = $postValues['path'].$documentObject->slug; |
|
| 69 | 69 | } else { |
| 70 | - $documentObject->path = $postValues['path'] . '/' . $documentObject->slug; |
|
| 70 | + $documentObject->path = $postValues['path'].'/'.$documentObject->slug; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->repository->saveDocument($documentObject); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function deleteDocumentBySlug($slug) |
| 80 | 80 | { |
| 81 | - $path = '/' . $slug; |
|
| 81 | + $path = '/'.$slug; |
|
| 82 | 82 | $this->repository->deleteDocumentByPath($path); |
| 83 | 83 | } |
| 84 | 84 | |