bundles/BlockManagerAdminBundle/EventListener/LayoutView/CacheEnabledListener.php
public function onBuildView(CollectViewParametersEvent $event): void
    {
        $view = $event->getView();
        if (!$view instanceof LayoutViewInterface) {
            return;
        }

        if ($view->getContext() !== ViewInterface::CONTEXT_ADMIN) {
            return;
        }

        $event->addParameter('http_cache_enabled', $this->cacheEnabled);
    }
public function onBuildView(CollectViewParametersEvent $event): void
    {
        $view = $event->getView();
        if (!$view instanceof LayoutViewInterface) {
            return;
        }

        if ($view->getContext() !== ViewInterface::CONTEXT_ADMIN) {
            return;
        }

        $event->addParameter('http_cache_enabled', $this->cacheEnabled);
    }
public function onBuildView ( CollectViewParametersEvent $ event ) : void { $ view = $ event -> getView ( ) ; if ( ! $ view instanceof LayoutViewInterface ) { return ; } if ( $ view -> getContext ( ) !== ViewInterface :: CONTEXT_ADMIN ) { return ; } $ event -> addParameter ( 'http_cache_enabled' , $ this -> cacheEnabled ) ; }
Injects if the HTTP cache clearing is enabled or not.
Injects if the HTTP cache clearing is enabled or not .