2 namespace TYPO3\CMS\Workspaces\Hook;
47 public function preProcess(&$pageUid, $backPath, $rootLine, $anchorSection, &$viewScript, $additionalGetVars, $switchFocus)
49 if (
$GLOBALS[
'BE_USER']->workspace !== 0) {
72 public function makeEditForm_accessCheck($params, &$form)
74 if (
$GLOBALS[
'BE_USER']->workspace !== 0 &&
$GLOBALS[
'TCA'][$params[
'table']][
'ctrl'][
'versioningWS']) {
75 $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($params[
'table'], $params[
'uid']);
76 if (abs($record[
't3ver_stage']) > \TYPO3\CMS\Workspaces\Service\StagesService::STAGE_EDIT_ID) {
78 $stageName = $stages->getStageTitle($record[
't3ver_stage']);
79 $editingName = $stages->getStageTitle(\TYPO3\CMS\Workspaces\Service\StagesService::STAGE_EDIT_ID);
80 $message =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:info.elementAlreadyModified');
81 $flashMessage =
GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, sprintf($message, $stageName, $editingName),
'', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
true);
85 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
86 $defaultFlashMessageQueue->enqueue($flashMessage);
89 return $params[
'hasAccess'];