public function ThemeTestSubscriber::onView in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/theme_test/src/EventSubscriber/ThemeTestSubscriber.php \Drupal\theme_test\EventSubscriber\ThemeTestSubscriber::onView()
Ensures that the theme registry was not initialized.
File
- core/
modules/ system/ tests/ modules/ theme_test/ src/ EventSubscriber/ ThemeTestSubscriber.php, line 83 - Contains \Drupal\theme_test\EventSubscriber\ThemeTestSubscriber.
Class
- ThemeTestSubscriber
- Theme test subscriber for controller requests.
Namespace
Drupal\theme_test\EventSubscriberCode
public function onView(GetResponseEvent $event) {
$current_route = $this->currentRouteMatch
->getRouteName();
$entity_autcomplete_route = array(
'system.entity_autocomplete',
);
if (in_array($current_route, $entity_autcomplete_route)) {
if ($this->container
->initialized('theme.registry')) {
throw new \Exception('registry initialized');
}
}
}