Skip to main content

Accordion

Helper for Accordion


Properties

groupClass

protected static string $groupClass
  • This property is static.

groupTag

protected static string $groupTag
  • This property is static.

allowedOptions

protected static $allowedOptions
  • This property is static.

allowedItemOptions

protected static $allowedItemOptions
  • This property is static.

Methods

prepareAttributes

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

Parameters:

ParameterTypeDescription
$optionsAndAttributesiterable

renderGroupItem

protected renderGroupItem(mixed $itemKey, mixed $itemSpec, iterable $attributes, iterable $options, bool $escape): string

Parameters:

ParameterTypeDescription
$itemKeymixed
$itemSpecmixed
$attributesiterable
$optionsiterable
$escapebool

prepareHeaderSpec

protected prepareHeaderSpec(mixed $header, mixed $itemKey, bool $isShown): iterable

Parameters:

ParameterTypeDescription
$headermixed
$itemKeymixed
$isShownbool

prepareBodySpec

protected prepareBodySpec(mixed $body, mixed $itemKey, string $parentId, string $headingId, bool $isShown): iterable

Parameters:

ParameterTypeDescription
$bodymixed
$itemKeymixed
$parentIdstring
$headingIdstring
$isShownbool

renderContainer

protected renderContainer(string $content, iterable $attributes, bool $escape = true): string

Parameters:

ParameterTypeDescription
$contentstring
$attributesiterable
$escapebool

Inherited methods

__invoke

Render a group

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

Parameters:

ParameterTypeDescription
$itemsiterableArray with the elements of the group
$optionsAndAttributesiterableAttributes for the group tag.
$escapeboolEscape the items.

Return Value:

The group XHTML.


renderGroupContainer

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

Parameters:

ParameterTypeDescription
$contentstring
$optionsAndAttributesiterable
$escapebool

prepareAttributes

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

Parameters:

ParameterTypeDescription
$optionsAndAttributesiterable

renderGroupItems

protected renderGroupItems(iterable $items, iterable $optionsAndAttributes, bool $escape = true): string

Parameters:

ParameterTypeDescription
$itemsiterable
$optionsAndAttributesiterable
$escapebool

renderGroupItem

protected renderGroupItem(mixed $itemKey, mixed $itemSpec, iterable $attributes, iterable $options, bool $escape): string
  • This method is abstract. Parameters:
ParameterTypeDescription
$itemKeymixed
$itemSpecmixed
$attributesiterable
$optionsiterable
$escapebool