class ContainerAwareHIncludeFragmentRenderer extends HIncludeFragmentRenderer

deprecated since version 2.7, to be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.

Implements the Hinclude rendering strategy.

Methods

setFragmentPath(string $path)

Sets the fragment path that triggers the fragment listener.

string
generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true)

Generates a fragment URI for a given controller.

__construct(ContainerInterface $container, UriSigner $signer = null, string $globalDefaultTemplate = null)

No description

setTemplating(EngineInterface|Environment|null $templating)

Sets the templating engine to use to render the default content.

bool
hasTemplating()

Checks if a templating engine has been set.

render(string|ControllerReference $uri, Request $request, array $options = array())

Renders a URI and returns the Response content.

string
getName()

Gets the name of the strategy.

Details

setFragmentPath(string $path)

Sets the fragment path that triggers the fragment listener.

Parameters

string $path The path

See also

FragmentListener

protected string generateFragmentUri(ControllerReference $reference, Request $request, bool $absolute = false, bool $strict = true)

Generates a fragment URI for a given controller.

Parameters

ControllerReference $reference A ControllerReference instance
Request $request A Request instance
bool $absolute Whether to generate an absolute URL or not
bool $strict Whether to allow non-scalar attributes or not

Return Value

string A fragment URI

at line 35
__construct(ContainerInterface $container, UriSigner $signer = null, string $globalDefaultTemplate = null)

Parameters

ContainerInterface $container
UriSigner $signer A UriSigner instance
string $globalDefaultTemplate The global default content (it can be a template name or the content)

setTemplating(EngineInterface|Environment|null $templating)

Sets the templating engine to use to render the default content.

Parameters

EngineInterface|Environment|null $templating An EngineInterface or an Environment instance

Exceptions

InvalidArgumentException

bool hasTemplating()

Checks if a templating engine has been set.

Return Value

bool true if the templating engine has been set, false otherwise

at line 45
Response render(string|ControllerReference $uri, Request $request, array $options = array())

Renders a URI and returns the Response content.

Parameters

string|ControllerReference $uri A URI as a string or a ControllerReference instance
Request $request A Request instance
array $options An array of options

Return Value

Response A Response instance

string getName()

Gets the name of the strategy.

Return Value

string The strategy name