PHP Class WellCommerce\Bundle\CoreBundle\Helper\Templating\TemplatingHelper

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Bundle\CoreBundle\Helper\Templating\TemplatingHelperInterface
Show file Open project: wellcommerce/wellcommerce

Protected Properties

Property Type Description
$engine Symfony\Bundle\FrameworkBundle\Templating\EngineInterface
$kernel Symfony\Component\HttpKernel\KernelInterface

Public Methods

Method Description
__construct ( Symfony\Bundle\FrameworkBundle\Templating\EngineInterface $engine, Symfony\Component\HttpKernel\KernelInterface $kernel ) TemplatingHelper constructor.
render ( string $name, array $parameters = [] ) : string
renderControllerResponse ( WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface $controller, string $templateName, array $parameters = [] ) : Response
resolveControllerTemplate ( WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface $controller, string $templateName ) : string

Protected Methods

Method Description
getBundleForClass ( ReflectionClass $reflectionClass ) : Symfony\Component\HttpKernel\Bundle\BundleInterface Returns bundle for particular controller
getBundleName ( ReflectionClass $reflectionClass ) : string Returns the bundle's name
getControllerLogicalName ( ReflectionClass $reflectionClass ) : string Returns the controller's logical name

Method Details

__construct() public method

TemplatingHelper constructor.
public __construct ( Symfony\Bundle\FrameworkBundle\Templating\EngineInterface $engine, Symfony\Component\HttpKernel\KernelInterface $kernel )
$engine Symfony\Bundle\FrameworkBundle\Templating\EngineInterface
$kernel Symfony\Component\HttpKernel\KernelInterface

getBundleForClass() protected method

Returns bundle for particular controller
protected getBundleForClass ( ReflectionClass $reflectionClass ) : Symfony\Component\HttpKernel\Bundle\BundleInterface
$reflectionClass ReflectionClass
return Symfony\Component\HttpKernel\Bundle\BundleInterface

getBundleName() protected method

Returns the bundle's name
protected getBundleName ( ReflectionClass $reflectionClass ) : string
$reflectionClass ReflectionClass
return string

getControllerLogicalName() protected method

Returns the controller's logical name
protected getControllerLogicalName ( ReflectionClass $reflectionClass ) : string
$reflectionClass ReflectionClass
return string

render() public method

public render ( string $name, array $parameters = [] ) : string
$name string
$parameters array
return string

renderControllerResponse() public method

public renderControllerResponse ( WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface $controller, string $templateName, array $parameters = [] ) : Response
$controller WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface
$templateName string
$parameters array
return Symfony\Component\HttpFoundation\Response

resolveControllerTemplate() public method

public resolveControllerTemplate ( WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface $controller, string $templateName ) : string
$controller WellCommerce\Bundle\CoreBundle\Controller\ControllerInterface
$templateName string
return string

Property Details

$engine protected property

protected EngineInterface,Symfony\Bundle\FrameworkBundle\Templating $engine
return Symfony\Bundle\FrameworkBundle\Templating\EngineInterface

$kernel protected property

protected KernelInterface,Symfony\Component\HttpKernel $kernel
return Symfony\Component\HttpKernel\KernelInterface