Skip to main content

Modal

Helper for rendering modal objects


Constants​

ConstantVisibilityTypeValue
MODAL_TITLEpublic'title'
MODAL_SUBTITLEpublic'subtitle'
MODAL_TEXTpublic'text'
MODAL_DIVIDERpublic'---'
MODAL_GRIDpublic'grid'
MODAL_FORMpublic'form'
MODAL_BUTTONpublic'button'
MODAL_FOOTERpublic'footer'

Properties​

allowedOptions​

protected static $allowedOptions
  • This property is static.

Methods​

__invoke​

Generates a 'modal' element

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

Parameters:

ParameterTypeDescription
$contentstring|arrayThe content of the alert
$optionsAndAttributesarrayOptions & Html attributes
$escapeboolTrue espace html content '$content'. Default True

Return Value:

The jumbotron XHTML.


preparePartsFromContent​

protected preparePartsFromContent(mixed $content): iterable

Parameters:

ParameterTypeDescription
$contentmixed

preparePartFromContent​

protected preparePartFromContent(string $type, mixed $content): iterable

Parameters:

ParameterTypeDescription
$typestring
$contentmixed

prepareModalAttributes​

protected prepareModalAttributes(iterable $parts, iterable $optionsAndAttributes): iterable

Parameters:

ParameterTypeDescription
$partsiterable
$optionsAndAttributesiterable

getTitleId​

protected getTitleId(iterable $parts): ?string

Parameters:

ParameterTypeDescription
$partsiterable

renderModalDialog​

protected renderModalDialog(iterable $content, iterable $optionsAndAttributes, bool $escape): string

Parameters:

ParameterTypeDescription
$contentiterable
$optionsAndAttributesiterable
$escapebool

renderParts​

protected renderParts(iterable $parts, iterable $optionsAndAttributes, bool $escape): string

Parameters:

ParameterTypeDescription
$partsiterable
$optionsAndAttributesiterable
$escapebool

renderHeaderPart​

protected renderHeaderPart(string $headerPart, iterable $optionsAndAttributes, bool $escape): string

Parameters:

ParameterTypeDescription
$headerPartstring
$optionsAndAttributesiterable
$escapebool

renderBodyPart​

protected renderBodyPart(string $bodyPart, iterable $optionsAndAttributes, bool $escape): string

Parameters:

ParameterTypeDescription
$bodyPartstring
$optionsAndAttributesiterable
$escapebool

renderFooterPart​

protected renderFooterPart(string $footerPart, bool $escape): string

Parameters:

ParameterTypeDescription
$footerPartstring
$escapebool

renderPart​

protected renderPart(iterable $part = [], bool $escape = true): string

Parameters:

ParameterTypeDescription
$partiterable
$escapebool

renderPartGrid​

protected renderPartGrid(iterable $part, bool $escape = true): string

Parameters:

ParameterTypeDescription
$partiterable
$escapebool

renderPartForm​

protected renderPartForm(iterable $part): string

Parameters:

ParameterTypeDescription
$partiterable

renderPartList​

protected renderPartList(?string $type = null, array $part = [], bool $escape = true): string

Parameters:

ParameterTypeDescription
$type?string
$partarray
$escapebool