HIncludeFragmentRenderer
extends RoutableFragmentRenderer
in package
Implements the Hinclude rendering strategy.
Tags
Table of Contents
Properties
- $charset : string
- $globalDefaultTemplate : string|null
- $signer : mixed
- $twig : mixed
Methods
- __construct() : mixed
- getName() : string
- {@inheritdoc}
- hasTemplating() : bool
- Checks if a templating engine has been set.
- render() : Response
- {@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
string
$charset
$globalDefaultTemplate
private
string|null
$globalDefaultTemplate
$signer
private
mixed
$signer
$twig
private
mixed
$twig
Methods
__construct()
public
__construct([Environment $twig = null ][, UriSigner $signer = null ][, string $globalDefaultTemplate = null ][, string $charset = 'utf-8' ]) : mixed
Parameters
- $twig : Environment = null
- $signer : UriSigner = null
- $globalDefaultTemplate : string = null
-
The global default content (it can be a template name or the content)
- $charset : string = 'utf-8'
getName()
{@inheritdoc}
public
getName() : string
Return values
stringhasTemplating()
Checks if a templating engine has been set.
public
hasTemplating() : bool
Return values
boolrender()
{@inheritdoc}
public
render(string|ControllerReference $uri, Request $request[, array<string|int, mixed> $options = [] ]) : Response
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 : string|ControllerReference
- $request : Request
- $options : array<string|int, mixed> = []
Return values
ResponsesetFragmentPath()
Sets the fragment path that triggers the fragment listener.
public
setFragmentPath(string $path) : mixed
Parameters
- $path : string
Tags
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