File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2121use TYPO3 \CMS \Backend \Controller \Event \ModifyPageLayoutContentEvent ;
2222use TYPO3 \CMS \Backend \Module \ModuleData ;
2323use TYPO3 \CMS \Backend \Utility \BackendUtility ;
24+ use TYPO3 \CMS \Backend \View \PageViewMode ;
2425use TYPO3 \CMS \ContentBlocks \DataProcessing \ContentBlockDataDecorator ;
2526use TYPO3 \CMS \ContentBlocks \DataProcessing \ContentTypeResolver ;
2627use TYPO3 \CMS \ContentBlocks \Definition \ContentType \ContentTypeInterface ;
@@ -55,8 +56,8 @@ public function __invoke(ModifyPageLayoutContentEvent $event): void
5556 $ request = $ event ->getRequest ();
5657 /** @var ModuleData $moduleData */
5758 $ moduleData = $ request ->getAttribute ('moduleData ' );
58- $ function = ( int )( $ moduleData ->get ('function ' ) ?? 0 );
59- if ($ function !== 1 ) {
59+ $ viewMode = PageViewMode::LayoutView:: tryFrom (( int )$ moduleData ->get ('viewMode ' ) );
60+ if ($ viewMode !== PageViewMode::LayoutView ) {
6061 return ;
6162 }
6263 $ pageTypeTable = 'pages ' ;
You can’t perform that action at this time.
0 commit comments