Documentation

HIncludeFragmentRenderer extends RoutableFragmentRenderer
in package

Implements the Hinclude rendering strategy.

Tags
author

Fabien Potencier fabien@symfony.com

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

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'

hasTemplating()

Checks if a templating engine has been set.

public hasTemplating() : bool
Return values
bool

render()

{@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
Response

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

Return values
string

        
On this page

Search results