Skip to main content

Figure

Helper for rendering figures


Methods

__invoke

Generates a 'figure' element

public __invoke(string $imageSrc, string $caption = '', array $attributes = [], array $imageOptionsAndAttributes = [], array $captionAttributes = [], bool $escape = true): string

Parameters:

ParameterTypeDescription
$imageSrcstringThe path to the image of the figure
$captionstringThe content of the caption of the figure. Default : empty
$attributesarrayHtml attributes of the "<figure>" element. Default : empty
$imageOptionsAndAttributesarray\TwbsHelper\View\Helper\Image options and attributes. Default : empty
$captionAttributesarrayHtml attributes of the "<figcaption>" (caption) element. Default : empty
$escapeboolTrue espace html caption '$caption'. Default True

Return Value:

The figure XHTML.

Throws:

  • InvalidArgumentException