HIncludeFragmentRenderer
extends RoutableFragmentRenderer
in package
Implements the Hinclude rendering strategy.
Tags
Table of Contents
- $charset : mixed
- $globalDefaultTemplate : mixed
- $signer : mixed
- $twig : mixed
- __construct() : mixed
- getName() : mixed
- {@inheritdoc}
- hasTemplating() : bool
- Checks if a templating engine has been set.
- render() : mixed
- {@inheritdoc}
- setFragmentPath() : mixed
- Sets the fragment path that triggers the fragment listener.
- generateFragmentUri() : string
- Generates a fragment URI for a given controller.
Properties
$charset
private
mixed
$charset
$globalDefaultTemplate
private
mixed
$globalDefaultTemplate
$signer
private
mixed
$signer
$twig
private
mixed
$twig
Methods
__construct()
public
__construct([Environment|null $twig = null ][, UriSigner|null $signer = null ][, string|null $globalDefaultTemplate = null ][, string $charset = 'utf-8' ]) : mixed
Parameters
- $twig : Environment|null = null
- $signer : UriSigner|null = null
- $globalDefaultTemplate : string|null = null
-
The global default content (it can be a template name or the content)
- $charset : string = 'utf-8'
Return values
mixed —getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —hasTemplating()
Checks if a templating engine has been set.
public
hasTemplating() : bool
Return values
bool —render()
{@inheritdoc}
public
render(mixed $uri, Request $request[, array<string|int, mixed> $options = [] ]) : mixed
Additional available options:
- default: The default content (it can be a template name or the content)
- id: An optional hx:include tag id attribute
- attributes: An optional array of hx:include tag attributes
Parameters
- $uri : mixed
- $request : Request
- $options : array<string|int, mixed> = []
Return values
mixed —setFragmentPath()
Sets the fragment path that triggers the fragment listener.
public
setFragmentPath(string $path) : mixed
Parameters
- $path : string
Tags
Return values
mixed —generateFragmentUri()
Generates a fragment URI for a given controller.
protected
generateFragmentUri(ControllerReference $reference, Request $request[, bool $absolute = false ][, bool $strict = true ]) : string
Parameters
- $reference : ControllerReference
- $request : Request
- $absolute : bool = false
-
Whether to generate an absolute URL or not
- $strict : bool = true
-
Whether to allow non-scalar attributes or not