Skip to main content

Toast

Helper for rendering toast


Constants

ConstantVisibilityTypeValue
PLACEMENT_TOP_LEFTpublic'top-left'
PLACEMENT_TOP_CENTERpublic'top-center'
PLACEMENT_TOP_RIGHTpublic'top-right'
PLACEMENT_MIDDLE_LEFTpublic'middle-left'
PLACEMENT_MIDDLE_CENTERpublic'middle-center'
PLACEMENT_MIDDLE_RIGHTpublic'middle-right'
PLACEMENT_BOTTOM_LEFTpublic'bottom-left'
PLACEMENT_BOTTOM_CENTERpublic'bottom-center'
PLACEMENT_BOTTOM_RIGHTpublic'bottom-right'

Methods

__invoke

Generates a 'toast' element

public __invoke(?iterable $options = null): string|\TwbsHelper\View\Helper\Toast

Parameters:

ParameterTypeDescription
$options?iterable

render

public render(iterable $options): string

Parameters:

ParameterTypeDescription
$optionsiterable

renderHeader

protected renderHeader(iterable $options): string

Parameters:

ParameterTypeDescription
$optionsiterable

renderBody

protected renderBody(iterable $options): string

Parameters:

ParameterTypeDescription
$optionsiterable

renderBodyButtons

protected renderBodyButtons(iterable $buttons): string

Parameters:

ParameterTypeDescription
$buttonsiterable

renderBodyButton

protected renderBodyButton(iterable $buttonSpec): string

Parameters:

ParameterTypeDescription
$buttonSpeciterable

renderCloseButton

protected renderCloseButton(iterable $options): string

Parameters:

ParameterTypeDescription
$optionsiterable

renderContainer

protected renderContainer(string $content, iterable $options): string

Parameters:

ParameterTypeDescription
$contentstring
$optionsiterable

getContainerAttributes

protected getContainerAttributes(iterable $options): iterable

Parameters:

ParameterTypeDescription
$optionsiterable

getContainerClasses

protected getContainerClasses(iterable $options): iterable

Parameters:

ParameterTypeDescription
$optionsiterable

getContainerPlacementClasses

public getContainerPlacementClasses(string $placement): iterable

Parameters:

ParameterTypeDescription
$placementstring

getContainerStyles

protected getContainerStyles(iterable $options): iterable

Parameters:

ParameterTypeDescription
$optionsiterable