Project

General

Profile

Feature #102444

Updated by Josef Glatz 6 months ago

h1. Problem/Description 

 There are scenarios where you have to inform the backend editor via flash messages or notifications when you hook into the TYPO3 DataHandler where DataHandler is started by drag-n-drop (DnD) in the TYPO3 pagetee. DataHandler. 

 Some scenarios: 

 * add a barrier prevent a action on pages which was started via DnD (drag and drop) in the TYPO3 pagetree 
 * prevent copying/moving pages from one TYPO3 site to another TYPO3 site (e.g. due to #102345) 
 * inform the backend editor about automatically changed values on moved/copied pages 
 * ... 

 h3. Example of creating a FlashMessage in a DataHandler hook: 

 <pre><code class="php"> 
 // ... and show a flash message 
 $message = GeneralUtility::makeInstance( 
     FlashMessage::class, 
     LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.body.move_or_copy_denied'), 
     LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.title.move_or_copy_denied'), 
     AbstractMessage::WARNING, 
     true 
 ); 
 $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); 
 $flashMessageService->getMessageQueueByIdentifier() 
     ->addMessage($message); 
 </code></pre> 


 </pre> 


 h1. ToDo(s) 

 Introduce a possibility like AJAX-Middlewares which are looking for "things" in the response like checking if there are flash messages in the queue which are then shown as e.g. notifications. 

 h1. Acceptance Criteria  

 Creating flashMessages in DataHandler hooks would be a benefit for any scenario in improving the backend user experience

Back