Accordion
Helper for Accordion
- Full name:
\TwbsHelper\View\Helper\Accordion - Parent class:
\TwbsHelper\View\Helper\AbstractGroup
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:
| Parameter | Type | Description |
|---|---|---|
$optionsAndAttributes | iterable |
renderGroupItem
protected renderGroupItem(mixed $itemKey, mixed $itemSpec, iterable $attributes, iterable $options, bool $escape): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$itemKey | mixed | |
$itemSpec | mixed | |
$attributes | iterable | |
$options | iterable | |
$escape | bool |
prepareHeaderSpec
protected prepareHeaderSpec(mixed $header, mixed $itemKey, bool $isShown): iterable
Parameters:
| Parameter | Type | Description |
|---|---|---|
$header | mixed | |
$itemKey | mixed | |
$isShown | bool |
prepareBodySpec
protected prepareBodySpec(mixed $body, mixed $itemKey, string $parentId, string $headingId, bool $isShown): iterable
Parameters:
| Parameter | Type | Description |
|---|---|---|
$body | mixed | |
$itemKey | mixed | |
$parentId | string | |
$headingId | string | |
$isShown | bool |
renderContainer
protected renderContainer(string $content, iterable $attributes, bool $escape = true): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$content | string | |
$attributes | iterable | |
$escape | bool |
Inherited methods
__invoke
Render a group
public __invoke(iterable $items, iterable $optionsAndAttributes = [], bool $escape = true): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$items | iterable | Array with the elements of the group |
$optionsAndAttributes | iterable | Attributes for the group tag. |
$escape | bool | Escape the items. |
Return Value:
The group XHTML.
renderGroupContainer
protected renderGroupContainer(string $content, iterable $optionsAndAttributes, bool $escape): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$content | string | |
$optionsAndAttributes | iterable | |
$escape | bool |
prepareAttributes
protected prepareAttributes(iterable $optionsAndAttributes): \TwbsHelper\View\HtmlAttributesSet
Parameters:
| Parameter | Type | Description |
|---|---|---|
$optionsAndAttributes | iterable |
renderGroupItems
protected renderGroupItems(iterable $items, iterable $optionsAndAttributes, bool $escape = true): string
Parameters:
| Parameter | Type | Description |
|---|---|---|
$items | iterable | |
$optionsAndAttributes | iterable | |
$escape | bool |
renderGroupItem
protected renderGroupItem(mixed $itemKey, mixed $itemSpec, iterable $attributes, iterable $options, bool $escape): string
- This method is abstract. Parameters:
| Parameter | Type | Description |
|---|---|---|
$itemKey | mixed | |
$itemSpec | mixed | |
$attributes | iterable | |
$options | iterable | |
$escape | bool |