Skip to content

Commit

Permalink
Merge pull request #30 from synolia/feature/allow-use-layout
Browse files Browse the repository at this point in the history
allow use include layout in template
  • Loading branch information
oallain authored Sep 8, 2023
2 parents 1f35846 + 6a6df1d commit c5ce05a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/EventSubscriber/MaintenanceEventsubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ public function handle(RequestEvent $event): void
{
$configuration = $this->configurationFactory->get();

/** @phpstan-ignore-next-line */ /** Call to function method_exists() with RequestEvent and 'isMainRequest' will always evaluate to true. */
if (method_exists($event, 'isMainRequest') && !$event->isMainRequest()) {
return;
}

/** @TODO Drop after remove Symfony 4.4 compatibility */
if (method_exists($event, 'isMasterRequest') && !$event->isMasterRequest()) {
return;
}

if (!$this->isMaintenanceVoter->isMaintenance($configuration, $event->getRequest())) {
return;
}
Expand Down

0 comments on commit c5ce05a

Please sign in to comment.