Commit 87d48502 authored by Benni Mack's avatar Benni Mack
Browse files

[FOLLOWUP][BUGFIX] Use Fluid standalone abstract classes

Resolves: #82414
Releases: master
Change-Id: I375bfd92e0b7eb58aa68f5a50e18b854d8fc6bdb
Reviewed-on: https://review.typo3.org/54946


Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 3af06145
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Backend\ViewHelpers;
use TYPO3\CMS\Backend\Backend\Avatar\Avatar;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -40,7 +40,6 @@ class AvatarViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('backendUser', 'int', 'uid of the backend user', false, 0);
$this->registerArgument('size', 'int', 'width and height of the image', false, 32);
$this->registerArgument('showIcon', 'bool', 'show the record icon as well', false, false);
......
......@@ -15,9 +15,10 @@ namespace TYPO3\CMS\Backend\ViewHelpers;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -32,7 +33,6 @@ class ModuleLinkViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('route', 'string', 'The route to link to', true);
$this->registerArgument('arguments', 'array', 'Additional link arguments', false, []);
}
......@@ -47,8 +47,7 @@ class ModuleLinkViewHelper extends AbstractViewHelper
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext): string
{
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
return (string)$uriBuilder->buildUriFromRoute($arguments['route'], $arguments['arguments']);
}
}
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
*/
use TYPO3\CMS\Belog\Domain\Model\LogEntry;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -32,7 +32,6 @@ class FormatDetailsViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('logEntry', LogEntry::class, '', true);
}
......
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
*/
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -32,7 +32,6 @@ class IsExtensionLoadedViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('extensionKey', 'string', 'The extension\'s key', true);
}
......
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Domain\Repository\BackendUserRepository;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -41,7 +41,6 @@ class UsernameViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('uid', 'int', 'Uid of the user', true);
}
......
......@@ -20,8 +20,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -44,7 +44,6 @@ class WorkspaceTitleViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('uid', 'int', 'UID of the workspace', true);
}
......
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
*/
use TYPO3\CMS\Beuser\Exception;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -31,7 +31,6 @@ class ArrayElementViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('array', 'array', 'Array to search in', true);
$this->registerArgument('key', 'string', 'Key to return its value', true);
$this->registerArgument('subKey', 'string', 'If result of key access is an array, subkey can be used to fetch an element from this again', false, '');
......
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -41,7 +41,6 @@ class PagesViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('uids', 'string', '', false, '');
}
......
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -41,7 +41,6 @@ class SysFileMountsViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('uids', 'string', '', false, '');
}
......
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers\Display;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -41,7 +41,6 @@ class SysLanguageViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('uids', 'string', '', false, '');
}
......
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -33,7 +33,6 @@ class EditRecordViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('parameters', 'string', 'Is a set of GET params to send to FormEngine', true);
}
......
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -32,7 +32,6 @@ class IssueCommandViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('parameters', 'string', 'Is a set of GET params to send to tce_db.php. Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World', true);
$this->registerArgument('redirectUrl', 'string', 'Redirect URL if any other that \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv(\'REQUEST_URI\') is preferred', false, '');
}
......
......@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
*/
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -46,7 +46,6 @@ class PermissionsViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('permission', 'int', 'Current permission', true);
$this->registerArgument('scope', 'string', '"user" / "group" / "everybody"', true);
$this->registerArgument('pageId', 'int', '', true);
......
......@@ -14,14 +14,15 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -45,7 +46,6 @@ class RemoveUserViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('backendUser', BackendUser::class, 'Target backendUser to switch active session to', true);
}
......@@ -74,8 +74,7 @@ class RemoveUserViewHelper extends AbstractViewHelper
'cmd[be_users][' . $backendUser->getUid() . '][delete]' => 1,
'redirect' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$url = (string)$uriBuilder->buildUriFromRoute('tce_db', $urlParameters);
return '<a class="btn btn-default t3js-modal-trigger" href="' . htmlspecialchars($url) . '"'
......
......@@ -19,8 +19,8 @@ use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -43,7 +43,6 @@ class SwitchUserViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('backendUser', BackendUser::class, 'Target backendUser to switch active session to', true);
}
......
......@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Core\ViewHelpers;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......
......@@ -18,8 +18,8 @@ use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Type\Icon\IconState;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -41,7 +41,6 @@ class IconViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('identifier', 'string', 'the table for the record icon', true);
$this->registerArgument('size', 'string', 'the icon size', false, Icon::SIZE_SMALL);
$this->registerArgument('overlay', 'string', '', false, null);
......@@ -64,7 +63,6 @@ class IconViewHelper extends AbstractViewHelper
$overlay = $arguments['overlay'];
$state = IconState::cast($arguments['state']);
$alternativeMarkupIdentifier = $arguments['alternativeMarkupIdentifier'];
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
return $iconFactory->getIcon($identifier, $size, $overlay, $state)->render($alternativeMarkupIdentifier);
}
......
......@@ -18,8 +18,8 @@ use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -47,7 +47,6 @@ class FormatsViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('documentTranslation', DocumentTranslation::class, '', true);
}
......
......@@ -14,8 +14,8 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers\Format;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -31,7 +31,6 @@ class ImplodeViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('implode', 'array', '', true);
$this->registerArgument('delimiter', 'string', '', false, ', ');
}
......
......@@ -14,8 +14,8 @@ namespace TYPO3\CMS\Extensionmanager\ViewHelpers;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
......@@ -32,7 +32,6 @@ class InstallationStateCssClassViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('needle', 'string', '', true);
$this->registerArgument('haystack', 'array', '', true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment