@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | defined('TYPO3') or die(); |
| 3 | 3 | |
| 4 | -call_user_func(function () { |
|
| 4 | +call_user_func(function() { |
|
| 5 | 5 | |
| 6 | 6 | // Check from Vidi configuration what default module should be loaded. |
| 7 | 7 | // Make sure the class exists to avoid a Runtime Error |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | /** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */ |
| 164 | 164 | $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); |
| 165 | 165 | foreach ($icons as $key => $icon) { |
| 166 | - $iconRegistry->registerIcon('extensions-vidi-' . $key, |
|
| 166 | + $iconRegistry->registerIcon('extensions-vidi-'.$key, |
|
| 167 | 167 | \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, |
| 168 | 168 | [ |
| 169 | 169 | 'source' => $icon |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $value = null; |
| 98 | 98 | if (substr($methodName, 0, 3) === 'get' && strlen($methodName) > 4) { |
| 99 | - $propertyName = strtolower(substr(substr($methodName, 3), 0, 1)) . substr(substr($methodName, 3), 1); |
|
| 99 | + $propertyName = strtolower(substr(substr($methodName, 3), 0, 1)).substr(substr($methodName, 3), 1); |
|
| 100 | 100 | |
| 101 | 101 | $fieldName = Property::name($propertyName)->of($this)->toFieldName(); |
| 102 | 102 | $field = Tca::table($this->dataType)->field($fieldName); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | } elseif (substr($methodName, 0, 3) === 'set' && strlen($methodName) > 4 && isset($arguments[0])) { |
| 119 | - $propertyName = strtolower(substr(substr($methodName, 3), 0, 1)) . substr(substr($methodName, 3), 1); |
|
| 119 | + $propertyName = strtolower(substr(substr($methodName, 3), 0, 1)).substr(substr($methodName, 3), 1); |
|
| 120 | 120 | $this->$propertyName = $arguments[0]; |
| 121 | 121 | } |
| 122 | 122 | return $value; |
@@ -174,13 +174,13 @@ discard block |
||
| 174 | 174 | |
| 175 | 175 | // Fetch values from repository. |
| 176 | 176 | $foreignPropertyName = Field::name($foreignFieldName)->of($this)->toPropertyName(); |
| 177 | - $findByProperty = 'findBy' . ucfirst($foreignPropertyName); |
|
| 177 | + $findByProperty = 'findBy'.ucfirst($foreignPropertyName); |
|
| 178 | 178 | |
| 179 | 179 | // Date picker (type == group) are special fields because property path must contain the table name |
| 180 | 180 | // to determine the relation type. Example for sys_category, property path will look like "items.sys_file" |
| 181 | 181 | $propertyValue = $this->uid; |
| 182 | 182 | if (Tca::table($foreignDataType)->field($foreignFieldName)->isGroup()) { |
| 183 | - $propertyValue = $this->dataType . '.' . $this->uid; |
|
| 183 | + $propertyValue = $this->dataType.'.'.$this->uid; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | $this->$propertyName = $foreignContentRepository->$findByProperty($propertyValue); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $foreignDataType = Tca::table($this->dataType)->field($fieldName)->getForeignTable(); |
| 201 | 201 | $foreignField = Tca::table($this->dataType)->field($fieldName)->getForeignField(); |
| 202 | 202 | $foreignContentRepository = ContentRepositoryFactory::getInstance($foreignDataType); |
| 203 | - $find = 'findOneBy' . GeneralUtility::underscoredToUpperCamelCase($foreignField); |
|
| 203 | + $find = 'findOneBy'.GeneralUtility::underscoredToUpperCamelCase($foreignField); |
|
| 204 | 204 | |
| 205 | 205 | /** @var Content $foreignObject */ |
| 206 | 206 | $this->$propertyName = $foreignContentRepository->$find($this->getUid()); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | public function offsetGet($offset) |
| 254 | 254 | { |
| 255 | 255 | $offset = Field::name($offset)->of($this)->toPropertyName(); |
| 256 | - $getter = 'get' . ucfirst($offset); |
|
| 256 | + $getter = 'get'.ucfirst($offset); |
|
| 257 | 257 | return $this->$getter(); |
| 258 | 258 | } |
| 259 | 259 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | public function offsetSet($offset, $value) |
| 271 | 271 | { |
| 272 | 272 | $offset = Field::name($offset)->of($this)->toPropertyName(); |
| 273 | - $setter = 'set' . ucfirst($offset); |
|
| 273 | + $setter = 'set'.ucfirst($offset); |
|
| 274 | 274 | $this->$setter($value); |
| 275 | 275 | return $this; |
| 276 | 276 | } |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | */ |
| 468 | 468 | protected function isBackendMode() |
| 469 | 469 | { |
| 470 | - return ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend();; |
|
| 470 | + return ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend(); ; |
|
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | } |
@@ -58,9 +58,9 @@ |
||
| 58 | 58 | protected function resolvePath($uri) |
| 59 | 59 | { |
| 60 | 60 | $uri = GeneralUtility::getFileAbsFileName($uri); |
| 61 | - $uri = substr($uri, strlen(Environment::getPublicPath() . '/')); |
|
| 61 | + $uri = substr($uri, strlen(Environment::getPublicPath().'/')); |
|
| 62 | 62 | if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend() && $uri !== false) { |
| 63 | - $uri = '../' . $uri; |
|
| 63 | + $uri = '../'.$uri; |
|
| 64 | 64 | } |
| 65 | 65 | return $uri; |
| 66 | 66 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $pageRenderer->addJsInlineCode('vidi-inline', $content); |
| 34 | 34 | |
| 35 | 35 | $publicResourcesPath = PathUtility::getPublicResourceWebPath('EXT:vidi/Resources/Public/'); |
| 36 | - $configuration['paths']['Fab/Vidi'] = $publicResourcesPath . 'JavaScript'; |
|
| 36 | + $configuration['paths']['Fab/Vidi'] = $publicResourcesPath.'JavaScript'; |
|
| 37 | 37 | $pageRenderer->addRequireJsConfiguration($configuration); |
| 38 | 38 | $pageRenderer->loadRequireJsModule('Fab/Vidi/Vidi/Main'); |
| 39 | 39 | } |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | /** @var \TYPO3\CMS\Core\Http\Response $response */ |
| 123 | 123 | $response = $this->templateVariableContainer->get('response'); |
| 124 | 124 | $response->withHeader('Content-Type', 'application/xml'); |
| 125 | - $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"'); |
|
| 125 | + $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"'); |
|
| 126 | 126 | $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath)); |
| 127 | 127 | $response->withHeader('Content-Description', 'File Transfer'); |
| 128 | 128 | } |
@@ -87,15 +87,15 @@ discard block |
||
| 87 | 87 | /** @var \Fab\Vidi\Domain\Model\Content $object */ |
| 88 | 88 | $object = reset($objects); |
| 89 | 89 | |
| 90 | - $this->temporaryDirectory = Environment::getPublicPath() . '/typo3temp/' . uniqid() . '/'; |
|
| 90 | + $this->temporaryDirectory = Environment::getPublicPath().'/typo3temp/'.uniqid().'/'; |
|
| 91 | 91 | GeneralUtility::mkdir($this->temporaryDirectory); |
| 92 | 92 | |
| 93 | 93 | // Compute file name and path variable |
| 94 | - $this->exportFileNameAndPath = $this->temporaryDirectory . $object->getDataType() . '-' . date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']); |
|
| 94 | + $this->exportFileNameAndPath = $this->temporaryDirectory.$object->getDataType().'-'.date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']); |
|
| 95 | 95 | |
| 96 | 96 | // Compute file name and path variable for zip |
| 97 | - $zipFileName = $object->getDataType() . '-' . date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']) . '.zip'; |
|
| 98 | - $this->zipFileNameAndPath = $this->temporaryDirectory . $zipFileName; |
|
| 97 | + $zipFileName = $object->getDataType().'-'.date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']).'.zip'; |
|
| 98 | + $this->zipFileNameAndPath = $this->temporaryDirectory.$zipFileName; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $response->withHeader('Expires', '0'); |
| 164 | 164 | $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0'); |
| 165 | 165 | $response->withHeader('Content-Type', 'application/zip'); |
| 166 | - $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->zipFileNameAndPath) . '"'); |
|
| 166 | + $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->zipFileNameAndPath).'"'); |
|
| 167 | 167 | $response->withHeader('Content-Length', filesize($this->zipFileNameAndPath)); |
| 168 | 168 | $response->withHeader('Content-Description', 'File Transfer'); |
| 169 | 169 | $response->withHeader('Content-Transfer-Encoding', 'binary'); |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | /** @var \TYPO3\CMS\Core\Http\Response $response */ |
| 97 | 97 | $response = $this->templateVariableContainer->get('response'); |
| 98 | 98 | $response->withHeader('Content-Type', 'application/csv'); |
| 99 | - $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"'); |
|
| 99 | + $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"'); |
|
| 100 | 100 | $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath)); |
| 101 | 101 | $response->withHeader('Content-Description', 'File Transfer'); |
| 102 | 102 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | $response->withHeader('Expires', '0'); |
| 104 | 104 | $response->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0'); |
| 105 | 105 | $response->withHeader('Content-Type', 'application/vnd.ms-excel'); |
| 106 | - $response->withHeader('Content-Disposition', 'attachment; filename="' . basename($this->exportFileNameAndPath) . '"'); |
|
| 106 | + $response->withHeader('Content-Disposition', 'attachment; filename="'.basename($this->exportFileNameAndPath).'"'); |
|
| 107 | 107 | $response->withHeader('Content-Length', filesize($this->exportFileNameAndPath)); |
| 108 | 108 | $response->withHeader('Content-Description', 'File Transfer'); |
| 109 | 109 | $response->withHeader('Content-Transfer-Encoding', 'binary'); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | |
| 57 | 57 | $part = $arguments['part']; |
| 58 | 58 | |
| 59 | - $getComponents = 'get' . ucfirst($part) . 'Components'; |
|
| 59 | + $getComponents = 'get'.ucfirst($part).'Components'; |
|
| 60 | 60 | $components = $moduleLoader->$getComponents(); |
| 61 | 61 | |
| 62 | 62 | $objectManager = GeneralUtility::makeInstance(ObjectManager::class); |