# Class Thelia\Core\EventListener\ViewListener | thelia

# Class ViewListener

ViewSubscriber Main class subscribing to view http response.

  Thelia\Core\EventListener\ViewListener implements Symfony\Component\EventDispatcher\EventSubscriberInterface

Namespace: Thelia\Core\EventListener
Author: Manuel Raynaud <mraynaud@openstudio.fr>
TODO: Look if it's possible to block this definition in dependency-injection
Located at core/lib/Thelia/Core/EventListener/ViewListener.php

Methods summary

`public`

# `__construct( Symfony\Component\DependencyInjection\ContainerInterface $container )`

#### Parameters

$container
  ``Thelia\Core\Template\ParserInterface``
  $parser

`public`

# `onKernelView( Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event )`

Launch the parser defined on the constructor and get the result.

The result is transform id needed into a Response object

#### Parameters

$event
  `Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent`
  $event

`public` | # `beforeKernelView( Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event )`
`public` | # `findView( Symfony\Component\HttpFoundation\Request $request )`

`public static array`

# `getSubscribedEvents( )`

Register the method to execute in this class for a specific event (here the kernel.view event)

#### Returns

`array`
The event names to listen to