Skip to main content

Menu

Helper for rendering abbreviations


  • Full name: \TwbsHelper\View\Helper\Navigation\Menu
  • Parent class: Menu

Properties​

ulClass​

CSS class to use for the ul element.

protected string $ulClass

renderInvisible​

Whether invisible items should be rendered by this helper

protected bool $renderInvisible

Methods​

renderMenu​

public renderMenu(mixed $container = null, array $options = []): mixed

Parameters:

ParameterTypeDescription
$containermixed
$optionsarray

prepareContainer​

protected prepareContainer(\Laminas\Navigation\AbstractContainer|string|null& $container = null): mixed

Parameters:

ParameterTypeDescription
$container\Laminas\Navigation\AbstractContainer|string|null

renderMenuItems​

protected renderMenuItems(string $content, array $options): string

Parameters:

ParameterTypeDescription
$contentstring
$optionsarray

renderMenuItemsNav​

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

Parameters:

ParameterTypeDescription
$contentstring
$optionsiterable

renderMenuItemsNavStyleAttribute​

protected renderMenuItemsNavStyleAttribute(string $navAttributesContent, iterable $options, bool $isRoot): string

Parameters:

ParameterTypeDescription
$navAttributesContentstring
$optionsiterable
$isRootbool

renderMenuItemsNavClassAttribute​

protected renderMenuItemsNavClassAttribute(string $navAttributesContent, iterable $options, bool $isRoot): string

Parameters:

ParameterTypeDescription
$navAttributesContentstring
$optionsiterable
$isRootbool

getMenuItemsNavClasses​

protected getMenuItemsNavClasses(iterable $options, bool $isRoot): iterable

Parameters:

ParameterTypeDescription
$optionsiterable
$isRootbool

renderMenuItemsWithoutList​

protected renderMenuItemsWithoutList(string $content): string

Parameters:

ParameterTypeDescription
$contentstring

protected renderMenuItemsLink(string $content, array $options): string

Parameters:

ParameterTypeDescription
$contentstring
$optionsarray

htmlify​

Returns an HTML string containing an 'a' element for the given page if the page's href is not empty, and a 'span' element if it is empty.

public htmlify(\Laminas\Navigation\Page\AbstractPage $page, bool $escapeLabel = true, bool $addClassToListItem = false): string

Overrides

  • See: .

Parameters:

ParameterTypeDescription
$page\Laminas\Navigation\Page\AbstractPagepage to generate HTML for
$escapeLabelboolWhether or not to escape the label
$addClassToListItemboolWhether or not to add the page class to the list item

htmlAttribs​

Converts an associative array to a string of tag attributes.

protected htmlAttribs(array $attributes): string

Overloads

  • See: .

Parameters:

ParameterTypeDescription
$attributesarrayan array where each key-value pair is converted
to an attribute name and value