PHP Класс Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener

Автор: Fabien Potencier ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$container Symfony\Component\DependencyInjection\ContainerInterface

Открытые методы

Метод Описание
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container ) Constructor.
onKernelController ( FilterControllerEvent $event ) Guesses the template name to render and its variables and adds them to the request object.
onKernelView ( GetResponseForControllerResultEvent $event ) Renders the template and initializes a new response object with the rendered template content.

Защищенные методы

Метод Описание
getBundleForClass ( string $class ) Returns the Bundle instance in which the given class name is located.
guessTemplateName ( array $controller, Request $request ) : TemplateReference Guesses and returns the template name to render based on the controller and action names.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface The service container instance

getBundleForClass() защищенный Метод

Returns the Bundle instance in which the given class name is located.
protected getBundleForClass ( string $class )
$class string A fully qualified controller class name

guessTemplateName() защищенный Метод

Guesses and returns the template name to render based on the controller and action names.
protected guessTemplateName ( array $controller, Request $request ) : TemplateReference
$controller array An array storing the controller object and action method
$request Symfony\Component\HttpFoundation\Request A Request instance
Результат Symfony\Bundle\FrameworkBundle\Templating\TemplateReference template reference

onKernelController() публичный Метод

Guesses the template name to render and its variables and adds them to the request object.
public onKernelController ( FilterControllerEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterControllerEvent A FilterControllerEvent instance

onKernelView() публичный Метод

Renders the template and initializes a new response object with the rendered template content.
public onKernelView ( GetResponseForControllerResultEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent A GetResponseForControllerResultEvent instance

Описание свойств

$container защищенное свойство

protected ContainerInterface,Symfony\Component\DependencyInjection $container
Результат Symfony\Component\DependencyInjection\ContainerInterface