Overview

Namespaces

  • Menu
    • Items
      • Contents
    • Traits

Classes

  • Item
  • ItemList
  • Overview
  • Namespace
  • Class

Class Item

An Item in a list

HtmlObject\Traits\Tag
Extended by Menu\Traits\MenuObject
Extended by Menu\Items\Item
Namespace: Menu\Items
Located at Menu/Items/Item.php
Methods summary
public
# __construct( Menu\Items\ItemList $parent, HtmlObject\Traits\Tag $value, array $children = null, array $element = null, string $beforeContent = null, string $afterContent = null )

Create a new item instance

Create a new item instance

Parameters

$parent
The parent
$value
The content
$children
Facultative children ItemLists
$element
The Item element
$beforeContent
String to add before the content
$afterContent
String to add after the content
public
# setActivePatterns( string|array $pattern, string $name = null )

Add an pattern to $patterns array

Add an pattern to $patterns array

Parameters

$pattern
The pattern
$name
Its name
public Menu\Items\ItemList
# stop( )

Break off a chain

Break off a chain

Returns

Menu\Items\ItemList
public Menu\Traits\Content
# getContent( )

Get the Item's content

Get the Item's content

Returns

Menu\Traits\Content
public
# setBeforeContent( string $value )

Set the value to be inserted before the item's content

Set the value to be inserted before the item's content

Parameters

$value
The value to insert
public
# setAfterContent( string $value )

Set the value to be inserted after the item's content

Set the value to be inserted after the item's content

Parameters

$value
The value to insert
public
# setElement( string $element = null )

Set the Item's element

Set the Item's element

Parameters

$element
public string
# getElement( )

Get the Item's element

Get the Item's element

Returns

string
public string
# render( array $depth = 0 )

Render the item

Render the item

Parameters

$depth

Returns

string
public boolean
# isActive( )

Check if this item is active

Check if this item is active

Returns

boolean
public
# hasChildren( )
protected boolean
# hasActivePatterns( )

Check if this item has an active pattern

Check if this item has an active pattern

Returns

boolean
public boolean
# hasActiveChild( )

Check if this item has an active child

Check if this item has an active child

Returns

boolean
protected string
# getUrl( )

Get the url of the Item's content

Get the url of the Item's content

Returns

string
public Request
# getRequest( )

Get the Request instance

Get the Request instance

Returns

Request
Methods inherited from Menu\Traits\MenuObject
getOption(), replaceOptions(), setOption()
Properties summary
protected array $patterns

Array of patterns to match the active state

Array of patterns to match the active state

# array()
Properties inherited from Menu\Traits\MenuObject
$options
API documentation generated by ApiGen