@@ -19,30 +19,30 @@ |
||
| 19 | 19 | class BackViewHelper extends AbstractViewHelper |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Returns the "back" buttons to be placed in the doc header. |
|
| 24 | - * |
|
| 25 | - * @return string |
|
| 26 | - */ |
|
| 27 | - public function render() |
|
| 28 | - { |
|
| 22 | + /** |
|
| 23 | + * Returns the "back" buttons to be placed in the doc header. |
|
| 24 | + * |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 27 | + public function render() |
|
| 28 | + { |
|
| 29 | 29 | |
| 30 | - $result = ''; |
|
| 31 | - if (GeneralUtility::_GET('returnUrl')) { |
|
| 32 | - $result = sprintf('<a href="%s" class="btn btn-default btn-sm btn-return-top">%s</a>', |
|
| 33 | - GeneralUtility::_GP('returnUrl'), |
|
| 34 | - $this->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL) |
|
| 35 | - ); |
|
| 36 | - } |
|
| 30 | + $result = ''; |
|
| 31 | + if (GeneralUtility::_GET('returnUrl')) { |
|
| 32 | + $result = sprintf('<a href="%s" class="btn btn-default btn-sm btn-return-top">%s</a>', |
|
| 33 | + GeneralUtility::_GP('returnUrl'), |
|
| 34 | + $this->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL) |
|
| 35 | + ); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - return $result; |
|
| 39 | - } |
|
| 38 | + return $result; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * @return IconFactory|object |
|
| 43 | - */ |
|
| 44 | - protected function getIconFactory() |
|
| 45 | - { |
|
| 46 | - return GeneralUtility::makeInstance(IconFactory::class); |
|
| 47 | - } |
|
| 41 | + /** |
|
| 42 | + * @return IconFactory|object |
|
| 43 | + */ |
|
| 44 | + protected function getIconFactory() |
|
| 45 | + { |
|
| 46 | + return GeneralUtility::makeInstance(IconFactory::class); |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -19,84 +19,84 @@ |
||
| 19 | 19 | class UserPreferencesViewHelper extends AbstractViewHelper |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * @var \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend |
|
| 24 | - */ |
|
| 25 | - protected $cacheInstance; |
|
| 22 | + /** |
|
| 23 | + * @var \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend |
|
| 24 | + */ |
|
| 25 | + protected $cacheInstance; |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * @return void |
|
| 29 | - */ |
|
| 30 | - public function initializeArguments() |
|
| 31 | - { |
|
| 32 | - $this->registerArgument('key', 'string', '', true); |
|
| 33 | - } |
|
| 27 | + /** |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 30 | + public function initializeArguments() |
|
| 31 | + { |
|
| 32 | + $this->registerArgument('key', 'string', '', true); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Interface with the BE user data. |
|
| 37 | - * |
|
| 38 | - * @return string |
|
| 39 | - */ |
|
| 40 | - public function render() |
|
| 41 | - { |
|
| 42 | - $this->initializeCache(); |
|
| 43 | - $key = $this->getModuleLoader()->getDataType() . '_' . $this->getBackendUserIdentifier() . '_' . $this->arguments['key']; |
|
| 35 | + /** |
|
| 36 | + * Interface with the BE user data. |
|
| 37 | + * |
|
| 38 | + * @return string |
|
| 39 | + */ |
|
| 40 | + public function render() |
|
| 41 | + { |
|
| 42 | + $this->initializeCache(); |
|
| 43 | + $key = $this->getModuleLoader()->getDataType() . '_' . $this->getBackendUserIdentifier() . '_' . $this->arguments['key']; |
|
| 44 | 44 | |
| 45 | - $value = $this->cacheInstance->get($key); |
|
| 46 | - if ($value) { |
|
| 47 | - $value = addslashes($value); |
|
| 48 | - } else { |
|
| 49 | - $value = ''; |
|
| 50 | - } |
|
| 51 | - return $value; |
|
| 52 | - } |
|
| 45 | + $value = $this->cacheInstance->get($key); |
|
| 46 | + if ($value) { |
|
| 47 | + $value = addslashes($value); |
|
| 48 | + } else { |
|
| 49 | + $value = ''; |
|
| 50 | + } |
|
| 51 | + return $value; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @return int |
|
| 56 | - */ |
|
| 57 | - protected function getBackendUserIdentifier() |
|
| 58 | - { |
|
| 59 | - return $this->getBackendUser()->user['uid']; |
|
| 60 | - } |
|
| 54 | + /** |
|
| 55 | + * @return int |
|
| 56 | + */ |
|
| 57 | + protected function getBackendUserIdentifier() |
|
| 58 | + { |
|
| 59 | + return $this->getBackendUser()->user['uid']; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * Returns an instance of the current Backend User. |
|
| 64 | - * |
|
| 65 | - * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication |
|
| 66 | - */ |
|
| 67 | - protected function getBackendUser() |
|
| 68 | - { |
|
| 69 | - return $GLOBALS['BE_USER']; |
|
| 70 | - } |
|
| 62 | + /** |
|
| 63 | + * Returns an instance of the current Backend User. |
|
| 64 | + * |
|
| 65 | + * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication |
|
| 66 | + */ |
|
| 67 | + protected function getBackendUser() |
|
| 68 | + { |
|
| 69 | + return $GLOBALS['BE_USER']; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * Get the Vidi Module Loader. |
|
| 74 | - * |
|
| 75 | - * @return ModuleLoader|object |
|
| 76 | - */ |
|
| 77 | - protected function getModuleLoader() |
|
| 78 | - { |
|
| 79 | - return GeneralUtility::makeInstance(ModuleLoader::class); |
|
| 80 | - } |
|
| 72 | + /** |
|
| 73 | + * Get the Vidi Module Loader. |
|
| 74 | + * |
|
| 75 | + * @return ModuleLoader|object |
|
| 76 | + */ |
|
| 77 | + protected function getModuleLoader() |
|
| 78 | + { |
|
| 79 | + return GeneralUtility::makeInstance(ModuleLoader::class); |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - /** |
|
| 83 | - * Initialize cache instance to be ready to use |
|
| 84 | - * |
|
| 85 | - * @return void |
|
| 86 | - */ |
|
| 87 | - protected function initializeCache() |
|
| 88 | - { |
|
| 89 | - $this->cacheInstance = $this->getCacheManager()->getCache('vidi'); |
|
| 90 | - } |
|
| 82 | + /** |
|
| 83 | + * Initialize cache instance to be ready to use |
|
| 84 | + * |
|
| 85 | + * @return void |
|
| 86 | + */ |
|
| 87 | + protected function initializeCache() |
|
| 88 | + { |
|
| 89 | + $this->cacheInstance = $this->getCacheManager()->getCache('vidi'); |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - /** |
|
| 93 | - * Return the Cache Manager |
|
| 94 | - * |
|
| 95 | - * @return CacheManager|object |
|
| 96 | - */ |
|
| 97 | - protected function getCacheManager() |
|
| 98 | - { |
|
| 99 | - return GeneralUtility::makeInstance(CacheManager::class); |
|
| 100 | - } |
|
| 92 | + /** |
|
| 93 | + * Return the Cache Manager |
|
| 94 | + * |
|
| 95 | + * @return CacheManager|object |
|
| 96 | + */ |
|
| 97 | + protected function getCacheManager() |
|
| 98 | + { |
|
| 99 | + return GeneralUtility::makeInstance(CacheManager::class); |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | 102 | } |
@@ -18,26 +18,26 @@ |
||
| 18 | 18 | class ModulePreferencesViewHelper extends AbstractViewHelper |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @return void |
|
| 23 | - */ |
|
| 24 | - public function initializeArguments() |
|
| 25 | - { |
|
| 26 | - $this->registerArgument('key', 'string', 'The module key', true); |
|
| 27 | - } |
|
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 24 | + public function initializeArguments() |
|
| 25 | + { |
|
| 26 | + $this->registerArgument('key', 'string', 'The module key', true); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Interface with the Module Loader |
|
| 31 | - * |
|
| 32 | - * @return string |
|
| 33 | - */ |
|
| 34 | - public function render() |
|
| 35 | - { |
|
| 36 | - $getter = 'get' . ucfirst($this->arguments['key']); |
|
| 29 | + /** |
|
| 30 | + * Interface with the Module Loader |
|
| 31 | + * |
|
| 32 | + * @return string |
|
| 33 | + */ |
|
| 34 | + public function render() |
|
| 35 | + { |
|
| 36 | + $getter = 'get' . ucfirst($this->arguments['key']); |
|
| 37 | 37 | |
| 38 | - /** @var ModulePreferences $modulePreferences */ |
|
| 39 | - $modulePreferences = GeneralUtility::makeInstance(ModulePreferences::class); |
|
| 40 | - return $modulePreferences->$getter(); |
|
| 41 | - } |
|
| 38 | + /** @var ModulePreferences $modulePreferences */ |
|
| 39 | + $modulePreferences = GeneralUtility::makeInstance(ModulePreferences::class); |
|
| 40 | + return $modulePreferences->$getter(); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | 43 | } |
@@ -18,42 +18,42 @@ |
||
| 18 | 18 | class GpViewHelper extends AbstractViewHelper |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @return void |
|
| 23 | - */ |
|
| 24 | - public function initializeArguments() |
|
| 25 | - { |
|
| 26 | - $this->registerArgument('argument', 'string', 'The argument name', true); |
|
| 27 | - $this->registerArgument('encode', 'bool', 'Whether to encode the URL.', false, true); |
|
| 28 | - } |
|
| 29 | - |
|
| 30 | - /** |
|
| 31 | - * Tells whether the argument exists or not. |
|
| 32 | - * |
|
| 33 | - * @return boolean |
|
| 34 | - */ |
|
| 35 | - public function render() |
|
| 36 | - { |
|
| 37 | - $value = ''; // default value |
|
| 38 | - |
|
| 39 | - // Merge parameters |
|
| 40 | - $parameters = GeneralUtility::_GET(); |
|
| 41 | - $post = GeneralUtility::_POST(); |
|
| 42 | - ArrayUtility::mergeRecursiveWithOverrule($parameters, $post); |
|
| 43 | - |
|
| 44 | - // Traverse argument parts and retrieve value. |
|
| 45 | - $argumentParts = GeneralUtility::trimExplode('|', $this->arguments['argument']); |
|
| 46 | - foreach ($argumentParts as $argumentPart) { |
|
| 47 | - if (isset($parameters[$argumentPart])) { |
|
| 48 | - $value = $parameters[$argumentPart]; |
|
| 49 | - $parameters = $value; |
|
| 50 | - } |
|
| 51 | - } |
|
| 52 | - |
|
| 53 | - // Possible url encode. |
|
| 54 | - if ($this->arguments['encode']) { |
|
| 55 | - $value = urlencode($value); |
|
| 56 | - } |
|
| 57 | - return $value; |
|
| 58 | - } |
|
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 24 | + public function initializeArguments() |
|
| 25 | + { |
|
| 26 | + $this->registerArgument('argument', 'string', 'The argument name', true); |
|
| 27 | + $this->registerArgument('encode', 'bool', 'Whether to encode the URL.', false, true); |
|
| 28 | + } |
|
| 29 | + |
|
| 30 | + /** |
|
| 31 | + * Tells whether the argument exists or not. |
|
| 32 | + * |
|
| 33 | + * @return boolean |
|
| 34 | + */ |
|
| 35 | + public function render() |
|
| 36 | + { |
|
| 37 | + $value = ''; // default value |
|
| 38 | + |
|
| 39 | + // Merge parameters |
|
| 40 | + $parameters = GeneralUtility::_GET(); |
|
| 41 | + $post = GeneralUtility::_POST(); |
|
| 42 | + ArrayUtility::mergeRecursiveWithOverrule($parameters, $post); |
|
| 43 | + |
|
| 44 | + // Traverse argument parts and retrieve value. |
|
| 45 | + $argumentParts = GeneralUtility::trimExplode('|', $this->arguments['argument']); |
|
| 46 | + foreach ($argumentParts as $argumentPart) { |
|
| 47 | + if (isset($parameters[$argumentPart])) { |
|
| 48 | + $value = $parameters[$argumentPart]; |
|
| 49 | + $parameters = $value; |
|
| 50 | + } |
|
| 51 | + } |
|
| 52 | + |
|
| 53 | + // Possible url encode. |
|
| 54 | + if ($this->arguments['encode']) { |
|
| 55 | + $value = urlencode($value); |
|
| 56 | + } |
|
| 57 | + return $value; |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -17,28 +17,28 @@ |
||
| 17 | 17 | class LanguagesViewHelper extends AbstractViewHelper |
| 18 | 18 | { |
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * Returns an array of available languages. |
|
| 22 | - * |
|
| 23 | - * @return array |
|
| 24 | - */ |
|
| 25 | - public function render() |
|
| 26 | - { |
|
| 27 | - $languages[0] = $this->getLanguageService()->getDefaultFlag(); |
|
| 28 | - |
|
| 29 | - foreach ($this->getLanguageService()->getLanguages() as $language) { |
|
| 30 | - |
|
| 31 | - $languages[$language['uid']] = $language['flag']; |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - return $languages; |
|
| 35 | - } |
|
| 36 | - |
|
| 37 | - /** |
|
| 38 | - * @return \Fab\Vidi\Language\LanguageService|object |
|
| 39 | - */ |
|
| 40 | - protected function getLanguageService() |
|
| 41 | - { |
|
| 42 | - return GeneralUtility::makeInstance(\Fab\Vidi\Language\LanguageService::class); |
|
| 43 | - } |
|
| 20 | + /** |
|
| 21 | + * Returns an array of available languages. |
|
| 22 | + * |
|
| 23 | + * @return array |
|
| 24 | + */ |
|
| 25 | + public function render() |
|
| 26 | + { |
|
| 27 | + $languages[0] = $this->getLanguageService()->getDefaultFlag(); |
|
| 28 | + |
|
| 29 | + foreach ($this->getLanguageService()->getLanguages() as $language) { |
|
| 30 | + |
|
| 31 | + $languages[$language['uid']] = $language['flag']; |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + return $languages; |
|
| 35 | + } |
|
| 36 | + |
|
| 37 | + /** |
|
| 38 | + * @return \Fab\Vidi\Language\LanguageService|object |
|
| 39 | + */ |
|
| 40 | + protected function getLanguageService() |
|
| 41 | + { |
|
| 42 | + return GeneralUtility::makeInstance(\Fab\Vidi\Language\LanguageService::class); |
|
| 43 | + } |
|
| 44 | 44 | } |
@@ -19,30 +19,30 @@ |
||
| 19 | 19 | class SpriteViewHelper extends AbstractViewHelper |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * @return void |
|
| 24 | - */ |
|
| 25 | - public function initializeArguments() |
|
| 26 | - { |
|
| 27 | - $this->registerArgument('name', 'string', 'the file to include', true); |
|
| 28 | - } |
|
| 22 | + /** |
|
| 23 | + * @return void |
|
| 24 | + */ |
|
| 25 | + public function initializeArguments() |
|
| 26 | + { |
|
| 27 | + $this->registerArgument('name', 'string', 'the file to include', true); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Returns an icon using sprites |
|
| 32 | - * |
|
| 33 | - * @return string |
|
| 34 | - */ |
|
| 35 | - public function render() |
|
| 36 | - { |
|
| 37 | - return $this->getIconFactory()->getIcon($this->arguments['name'], Icon::SIZE_SMALL); |
|
| 38 | - } |
|
| 30 | + /** |
|
| 31 | + * Returns an icon using sprites |
|
| 32 | + * |
|
| 33 | + * @return string |
|
| 34 | + */ |
|
| 35 | + public function render() |
|
| 36 | + { |
|
| 37 | + return $this->getIconFactory()->getIcon($this->arguments['name'], Icon::SIZE_SMALL); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * @return IconFactory|object |
|
| 42 | - */ |
|
| 43 | - protected function getIconFactory() |
|
| 44 | - { |
|
| 45 | - return GeneralUtility::makeInstance(IconFactory::class); |
|
| 46 | - } |
|
| 40 | + /** |
|
| 41 | + * @return IconFactory|object |
|
| 42 | + */ |
|
| 43 | + protected function getIconFactory() |
|
| 44 | + { |
|
| 45 | + return GeneralUtility::makeInstance(IconFactory::class); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | 48 | } |
@@ -18,47 +18,47 @@ |
||
| 18 | 18 | class IsRelatedToViewHelper extends AbstractViewHelper |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @return void |
|
| 23 | - */ |
|
| 24 | - public function initializeArguments() |
|
| 25 | - { |
|
| 26 | - $this->registerArgument('relatedContent', Content::class, 'The related content', true); |
|
| 27 | - } |
|
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 24 | + public function initializeArguments() |
|
| 25 | + { |
|
| 26 | + $this->registerArgument('relatedContent', Content::class, 'The related content', true); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Tells whether a Content is related to another content. |
|
| 31 | - * The $fieldName corresponds to the relational field name |
|
| 32 | - * between the first content object and the second. |
|
| 33 | - * |
|
| 34 | - * @return boolean |
|
| 35 | - */ |
|
| 36 | - public function render() |
|
| 37 | - { |
|
| 38 | - /** @var Content $relatedContent */ |
|
| 39 | - $relatedContent = $this->arguments['relatedContent']; |
|
| 29 | + /** |
|
| 30 | + * Tells whether a Content is related to another content. |
|
| 31 | + * The $fieldName corresponds to the relational field name |
|
| 32 | + * between the first content object and the second. |
|
| 33 | + * |
|
| 34 | + * @return boolean |
|
| 35 | + */ |
|
| 36 | + public function render() |
|
| 37 | + { |
|
| 38 | + /** @var Content $relatedContent */ |
|
| 39 | + $relatedContent = $this->arguments['relatedContent']; |
|
| 40 | 40 | |
| 41 | - $isChecked = false; |
|
| 41 | + $isChecked = false; |
|
| 42 | 42 | |
| 43 | - // Only computes whether the object is checked if one row is beeing edited. |
|
| 44 | - $numberOfObjects = $this->templateVariableContainer->get('numberOfObjects'); |
|
| 45 | - if ($numberOfObjects === 1) { |
|
| 43 | + // Only computes whether the object is checked if one row is beeing edited. |
|
| 44 | + $numberOfObjects = $this->templateVariableContainer->get('numberOfObjects'); |
|
| 45 | + if ($numberOfObjects === 1) { |
|
| 46 | 46 | |
| 47 | - /** @var Content $content */ |
|
| 48 | - $content = $this->templateVariableContainer->get('content'); |
|
| 49 | - $fieldName = $this->templateVariableContainer->get('fieldName'); |
|
| 47 | + /** @var Content $content */ |
|
| 48 | + $content = $this->templateVariableContainer->get('content'); |
|
| 49 | + $fieldName = $this->templateVariableContainer->get('fieldName'); |
|
| 50 | 50 | |
| 51 | - // Build an array of user group uids |
|
| 52 | - $relatedContentsIdentifiers = []; |
|
| 51 | + // Build an array of user group uids |
|
| 52 | + $relatedContentsIdentifiers = []; |
|
| 53 | 53 | |
| 54 | - /** @var Content $contentObject */ |
|
| 55 | - foreach ($content[$fieldName] as $contentObject) { |
|
| 56 | - $relatedContentsIdentifiers[] = $contentObject->getUid(); |
|
| 57 | - } |
|
| 54 | + /** @var Content $contentObject */ |
|
| 55 | + foreach ($content[$fieldName] as $contentObject) { |
|
| 56 | + $relatedContentsIdentifiers[] = $contentObject->getUid(); |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - $isChecked = in_array($relatedContent->getUid(), $relatedContentsIdentifiers, true); |
|
| 60 | - } |
|
| 59 | + $isChecked = in_array($relatedContent->getUid(), $relatedContentsIdentifiers, true); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - return $isChecked; |
|
| 63 | - } |
|
| 62 | + return $isChecked; |
|
| 63 | + } |
|
| 64 | 64 | } |
@@ -16,22 +16,22 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | class CanBeHiddenViewHelper extends AbstractViewHelper |
| 18 | 18 | { |
| 19 | - /** |
|
| 20 | - * @return void |
|
| 21 | - */ |
|
| 22 | - public function initializeArguments() |
|
| 23 | - { |
|
| 24 | - $this->registerArgument('name', 'string', 'The column name', true); |
|
| 25 | - } |
|
| 19 | + /** |
|
| 20 | + * @return void |
|
| 21 | + */ |
|
| 22 | + public function initializeArguments() |
|
| 23 | + { |
|
| 24 | + $this->registerArgument('name', 'string', 'The column name', true); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Returns whether the column can be hidden or not. |
|
| 29 | - * |
|
| 30 | - * @return boolean |
|
| 31 | - */ |
|
| 32 | - public function render() |
|
| 33 | - { |
|
| 34 | - return Tca::grid()->canBeHidden($this->arguments['name']); |
|
| 35 | - } |
|
| 27 | + /** |
|
| 28 | + * Returns whether the column can be hidden or not. |
|
| 29 | + * |
|
| 30 | + * @return boolean |
|
| 31 | + */ |
|
| 32 | + public function render() |
|
| 33 | + { |
|
| 34 | + return Tca::grid()->canBeHidden($this->arguments['name']); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | } |
@@ -18,25 +18,25 @@ |
||
| 18 | 18 | class HasRelationViewHelper extends AbstractViewHelper |
| 19 | 19 | { |
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Return whether the current field name has a relation to the main content. |
|
| 23 | - * |
|
| 24 | - * @return boolean |
|
| 25 | - */ |
|
| 26 | - public function render() |
|
| 27 | - { |
|
| 28 | - $fieldNameAndPath = $this->templateVariableContainer->get('columnName'); |
|
| 29 | - $dataType = $this->getFieldPathResolver()->getDataType($fieldNameAndPath); |
|
| 30 | - $fieldName = $this->getFieldPathResolver()->stripFieldPath($fieldNameAndPath); |
|
| 31 | - $hasRelation = Tca::table($dataType)->field($fieldName)->hasRelation(); |
|
| 32 | - return $hasRelation; |
|
| 33 | - } |
|
| 21 | + /** |
|
| 22 | + * Return whether the current field name has a relation to the main content. |
|
| 23 | + * |
|
| 24 | + * @return boolean |
|
| 25 | + */ |
|
| 26 | + public function render() |
|
| 27 | + { |
|
| 28 | + $fieldNameAndPath = $this->templateVariableContainer->get('columnName'); |
|
| 29 | + $dataType = $this->getFieldPathResolver()->getDataType($fieldNameAndPath); |
|
| 30 | + $fieldName = $this->getFieldPathResolver()->stripFieldPath($fieldNameAndPath); |
|
| 31 | + $hasRelation = Tca::table($dataType)->field($fieldName)->hasRelation(); |
|
| 32 | + return $hasRelation; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @return \Fab\Vidi\Resolver\FieldPathResolver|object |
|
| 37 | - */ |
|
| 38 | - protected function getFieldPathResolver() |
|
| 39 | - { |
|
| 40 | - return GeneralUtility::makeInstance(\Fab\Vidi\Resolver\FieldPathResolver::class); |
|
| 41 | - } |
|
| 35 | + /** |
|
| 36 | + * @return \Fab\Vidi\Resolver\FieldPathResolver|object |
|
| 37 | + */ |
|
| 38 | + protected function getFieldPathResolver() |
|
| 39 | + { |
|
| 40 | + return GeneralUtility::makeInstance(\Fab\Vidi\Resolver\FieldPathResolver::class); |
|
| 41 | + } |
|
| 42 | 42 | } |