Alert
Helper for rendering alerts
- Full name:
\TwbsHelper\View\Helper\Alert - Parent class:
\TwbsHelper\View\Helper\AbstractHtmlElement
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:
| Parameter | Type | Description |
|---|---|---|
$content | string | The content of the alert |
$optionsAndAttributes | string|array | Html attributes of the "<div>" element |
$escape | bool | True espace html content '$content'. Default True |
Return Value:
The alert XHTML.
prepareAttributes
protected prepareAttributes(iterable $optionsAndAttributes): \TwbsHelper\View\HtmlAttributesSet
Parameters:
| Parameter | Type | Description |
|---|---|---|
$optionsAndAttributes | iterable |
renderHeading
protected renderHeading(string $heading, bool $escape): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$heading | string | |
$escape | bool |
renderDismissible
protected renderDismissible(mixed $close): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$close | mixed |