Skip to main content

Card

Helper for rendering cards


Constants

ConstantVisibilityTypeValue
CARD_ROWpublic'row'
CARD_HEADERpublic'header'
CARD_HEADER_NAV_TABSpublic'nav'
CARD_FOOTERpublic'footer'
CARD_IMGpublic'image'
CARD_IMG_TOPpublic'image_top'
CARD_IMG_BOTTOMpublic'image_bottom'
CARD_OVERLAYpublic'overlay'
CARD_LIST_GROUPpublic'listGroup'
CARD_BODY_TITLEpublic'title'
CARD_BODY_SUBTITLEpublic'subtitle'
CARD_BODY_TEXTpublic'text'
CARD_BODY_LINKpublic'link'
CARD_BODY_BLOCKQUOTEpublic'blockquote'

Properties

allowedOptions

protected static $allowedOptions
  • This property is static.

cardParts

protected static $cardParts
  • This property is static.

Methods

__invoke

Generates an 'alert' element

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

Parameters:

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

Return Value:

The card XHTML.


renderCardContainer

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

Parameters:

ParameterTypeDescription
$contentmixed
$optionsAndAttributesiterable
$escapebool

renderCardContainerContent

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

Parameters:

ParameterTypeDescription
$contentmixed
$optionsAndAttributesiterable
$escapebool

renderCardRow

protected renderCardRow(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardColumn

protected renderCardColumn(mixed $content, iterable $attributes, bool $escape): string

Parameters:

ParameterTypeDescription
$contentmixed
$attributesiterable
$escapebool

renderCardHeader

protected renderCardHeader(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardHeaderNav

protected renderCardHeaderNav(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardFooter

protected renderCardFooter(iterable $arguments, bool $escape = true): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardImg

protected renderCardImg(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardImgTop

protected renderCardImgTop(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardImgBottom

protected renderCardImgBottom(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardOverlay

protected renderCardOverlay(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderImage

protected renderImage(string $imageSrc, iterable $attributes, bool $escape): string

Parameters:

ParameterTypeDescription
$imageSrcstring
$attributesiterable
$escapebool

renderCardListGroup

protected renderCardListGroup(iterable $arguments, bool $escape): string

Parameters:

ParameterTypeDescription
$argumentsiterable
$escapebool

renderCardBody

protected renderCardBody(mixed $content, iterable $attributes, bool $escape): string

Parameters:

ParameterTypeDescription
$contentmixed
$attributesiterable
$escapebool

renderCardItem

protected renderCardItem(mixed $type, mixed $typeContent, bool $escape): string

Parameters:

ParameterTypeDescription
$typemixed
$typeContentmixed
$escapebool