Andrew's Web Libraries (AWL)
 All Classes Namespaces Functions Variables Pages
MenuOption Class Reference

Public Member Functions

 __construct ($label, $target, $title="", $style="menu", $sortkey=1000)
 
 Render ()
 
 Set ($attribute, $value)
 
 Active ($style=false)
 
 AddSubmenu (&$submenu_set)
 
 IsActive ()
 
 MaybeActive ($test_pattern, $active_style)
 

Public Attributes

 $label
 
 $target
 
 $title
 
 $active
 
 $sortkey
 
 $style
 
 $submenu_set
 
 $self
 
 $rendered
 

Detailed Description

Definition at line 21 of file MenuSet.php.

Constructor & Destructor Documentation

MenuOption::__construct (   $label,
  $target,
  $title = "",
  $style = "menu",
  $sortkey = 1000 
)

#@- The thing we click

Parameters
string$labelThe label to display for this option.
string$targetThe URL to target for this option.
string$titleSome tooltip help for the title tag.
string$styleA base class name for this option.
int$sortkeyAn (optional) value to allow option ordering.

Definition at line 92 of file MenuSet.php.

Member Function Documentation

MenuOption::Active (   $style = false)

Mark it as active, with a fancy style to distinguish that

Parameters
string$styleA style used to highlight that the option is active.

Definition at line 139 of file MenuSet.php.

MenuOption::AddSubmenu ( $submenu_set)

This menu option is now promoted to the head of a tree

Definition at line 147 of file MenuSet.php.

MenuOption::IsActive ( )

Whether this option is currently active.

Returns
boolean The value of the active flag.

Definition at line 155 of file MenuSet.php.

MenuOption::MaybeActive (   $test_pattern,
  $active_style 
)

Whether this option is currently active.

Returns
boolean The value of the active flag.

Definition at line 163 of file MenuSet.php.

MenuOption::Render ( )

Convert the menu option into an HTML string

Returns
string The HTML fragment for the menu option.

Definition at line 109 of file MenuSet.php.

MenuOption::Set (   $attribute,
  $value 
)

Set arbitrary attributes of the menu option

Parameters
string$attributeAn arbitrary attribute to be set in the hyperlink.
string$valueA value for this attribute.

Definition at line 131 of file MenuSet.php.


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