diff --git a/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php b/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php index 058bf570edce1ad0b1fca621115edb6c5f5d5aa1..48f46ec779419e49467146921b4677bfbdde19bd 100644 --- a/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php +++ b/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php @@ -98,7 +98,9 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar $this->addJavascriptToBackend(); $index = 0; - $availableWorkspaces = \TYPO3\CMS\Workspaces\Service\WorkspaceService::getAvailableWorkspaces(); + /** @var \TYPO3\CMS\Workspaces\Service\WorkspaceService $wsService */ + $wsService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService'); + $availableWorkspaces = $wsService->getAvailableWorkspaces(); $activeWorkspace = (int)$GLOBALS['BE_USER']->workspace; $stateCheckedIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-checked'); $stateUncheckedIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty', array( @@ -167,4 +169,4 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) { $GLOBALS['TYPO3backend']->addToolbarItem('workSpaceSelector', 'TYPO3\\CMS\\Workspaces\\ExtDirect\\WorkspaceSelectorToolbarItem'); -} \ No newline at end of file +}