Skip to main content

Alert

Helper for rendering alerts


Properties

allowedOptions

protected static $allowedOptions
  • This property is static.

Methods

__invoke

Generates an 'alert' element

public __invoke(string $content, string|array $optionsAndAttributes = null, bool $escape = true): string

Parameters:

ParameterTypeDescription
$contentstringThe content of the alert
$optionsAndAttributesstring|arrayHtml attributes of the "<div>" element
$escapeboolTrue espace html content '$content'. Default True

Return Value:

The alert XHTML.


prepareAttributes

protected prepareAttributes(iterable $optionsAndAttributes): \TwbsHelper\View\HtmlAttributesSet

Parameters:

ParameterTypeDescription
$optionsAndAttributesiterable

renderHeading

protected renderHeading(string $heading, bool $escape): string

Parameters:

ParameterTypeDescription
$headingstring
$escapebool

renderDismissible

protected renderDismissible(mixed $close): string

Parameters:

ParameterTypeDescription
$closemixed