CMSimple_XH
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XH\Li Class Reference

The menu renderer. More...

Public Member Functions

 render (array $ta, $st)
 Renders a menu structure of certain pages. More...
 

Protected Member Functions

 renderULStartTags ($i)
 Renders the ul start tags. More...
 
 renderEndTags ($i)
 Renders the ul and li end tags. More...
 
 getMenuLevel ($i)
 Returns the menu level of a menu item. More...
 
 getClassName ($i)
 Returns the class name of the current item. More...
 
 isSelected ($i)
 Returns whether the current menu item is selected. More...
 
 isAnchestorOfSelectedPage ($i)
 Returns whether the current item is an anchestor of the selected page. More...
 
 hasChildren ($i)
 Returns whether the current item has children. More...
 
 renderMenuItem ($i)
 Renders a menu item. More...
 
 renderAnchorStartTag ($i)
 Renders an anchor start tag. More...
 
 shallOpenInNewWindow ($i)
 Returns whether a link shall be opened in a new window. More...
 

Protected Attributes

array $ta
 The relevant page indexes.
 
mixed $st
 The menu level to start with or the type of menu.
 
bool $tf
 Whether the current menu item is not representing the requested page.
 
int $b
 The "default" menu level.
 
array $lf
 The array of flags, signalling whether a certain menu level is open.
 

Detailed Description

The menu renderer.

Author
Peter Harteg peter.nosp@m.@har.nosp@m.teg.d.nosp@m.k
The CMSimple_XH developers devs@.nosp@m.cmsi.nosp@m.mple-.nosp@m.xh.o.nosp@m.rg
See also
http://cmsimple-xh.org/
Since
1.6.3

Member Function Documentation

◆ getClassName()

XH\Li::getClassName (   $i)
protected

Returns the class name of the current item.

Parameters
int$iThe index of the current item.
Returns
string

◆ getMenuLevel()

XH\Li::getMenuLevel (   $i)
protected

Returns the menu level of a menu item.

Parameters
int$iThe index of the current item.
Returns
int

◆ hasChildren()

XH\Li::hasChildren (   $i)
protected

Returns whether the current item has children.

Parameters
int$iThe index of the current item.
Returns
bool

◆ isAnchestorOfSelectedPage()

XH\Li::isAnchestorOfSelectedPage (   $i)
protected

Returns whether the current item is an anchestor of the selected page.

Parameters
int$iThe index of the current item.
Returns
bool

◆ isSelected()

XH\Li::isSelected (   $i)
protected

Returns whether the current menu item is selected.

Parameters
int$iThe index of the current item.
Returns
bool

◆ render()

XH\Li::render ( array  $ta,
  $st 
)

Renders a menu structure of certain pages.

Parameters
array$taThe indexes of the pages.
mixed$stThe menu level to start with or the type of menu.
Returns
string HTML

◆ renderAnchorStartTag()

XH\Li::renderAnchorStartTag (   $i)
protected

Renders an anchor start tag.

Parameters
int$iThe index of the current item.
Returns
string HTML

◆ renderEndTags()

XH\Li::renderEndTags (   $i)
protected

Renders the ul and li end tags.

Parameters
int$iThe index of the current item.
Returns
string HTML

◆ renderMenuItem()

XH\Li::renderMenuItem (   $i)
protected

Renders a menu item.

Parameters
int$iThe index of the current item.
Returns
string HTML

◆ renderULStartTags()

XH\Li::renderULStartTags (   $i)
protected

Renders the ul start tags.

Parameters
int$iThe index of the current item.
Returns
string HTML

◆ shallOpenInNewWindow()

XH\Li::shallOpenInNewWindow (   $i)
protected

Returns whether a link shall be opened in a new window.

Parameters
int$iThe index of the current item.
Returns
bool

The documentation for this class was generated from the following file: