mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-08 17:06:09 +01:00
[TASK] Replace sprite icon for visibility with IconFactory
Replaces all IconUtility::getSpriteIcon calls for the icon actions-edit-hide and actions-edit-unhide with the new IconFactory. Change-Id: If3deb6fb4c6f867c21aaff34796515d933fa90c3 Resolves: #68925 Releases: master Reviewed-on: http://review.typo3.org/42499 Reviewed-by: Daniel Goerz <ervaude@gmail.com> Tested-by: Daniel Goerz <ervaude@gmail.com> Reviewed-by: Frank Nägler <frank.naegler@typo3.org> Tested-by: Frank Nägler <frank.naegler@typo3.org>
This commit is contained in:
parent
5db2d786a9
commit
854b563742
1 changed files with 9 additions and 2 deletions
|
@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
|
|||
use TYPO3\CMS\Backend\Utility\IconUtility;
|
||||
use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Database\DatabaseConnection;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
|
@ -55,6 +56,11 @@ class FrontendEditPanel {
|
|||
*/
|
||||
protected $backendUser;
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Core\Imaging\IconFactory
|
||||
*/
|
||||
protected $iconFactory;
|
||||
|
||||
/**
|
||||
* Constructor for the edit panel
|
||||
*
|
||||
|
@ -68,6 +74,7 @@ class FrontendEditPanel {
|
|||
$this->backendUser = $backendUser ?: $GLOBALS['BE_USER'];
|
||||
$this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
|
||||
$this->cObj->start(array());
|
||||
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,10 +123,10 @@ class FrontendEditPanel {
|
|||
// Hiding for localizations because it is unknown what should be the function in that case
|
||||
if (isset($allow['hide']) && $hideField && $this->backendUser->workspace === 0 && !$dataArr['_LOCALIZED_UID']) {
|
||||
if ($dataArr[$hideField]) {
|
||||
$icon = IconUtility::getSpriteIcon('actions-edit-unhide', array('title' => $this->backendUser->extGetLL('p_unhide')));
|
||||
$icon = $this->iconFactory->getIcon('actions-edit-unhide');
|
||||
$panel .= $this->editPanelLinkWrap($icon, $formName, 'unhide');
|
||||
} else {
|
||||
$icon = IconUtility::getSpriteIcon('actions-edit-hide', array('title' => $this->backendUser->extGetLL('p_hide')));
|
||||
$icon = $this->iconFactory->getIcon('actions-edit-hide');
|
||||
$panel .= $this->editPanelLinkWrap($icon, $formName, 'hide', '', $this->backendUser->extGetLL('p_hideConfirm'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue