forked from GNUsocial/gnu-social
abstraction for starting and ending a menu
This commit is contained in:
parent
876c7a42c8
commit
b4f1281799
17
lib/menu.php
17
lib/menu.php
@ -62,6 +62,23 @@ class Menu extends Widget
|
||||
$this->actionName = $action->trimmed('action');
|
||||
}
|
||||
|
||||
function id()
|
||||
{
|
||||
return 'unknown_menu';
|
||||
}
|
||||
|
||||
function menuStart()
|
||||
{
|
||||
$this->action->elementStart('div', array('id' => $this->id()));
|
||||
$this->action->elementStart('ul', array('class' => 'nav'));
|
||||
}
|
||||
|
||||
function menuEnd()
|
||||
{
|
||||
$this->action->elementEnd('ul');
|
||||
$this->action->elementEnd('div');
|
||||
}
|
||||
|
||||
function item($actionName, $args, $label, $description, $id=null)
|
||||
{
|
||||
if (empty($id)) {
|
||||
|
Loading…
Reference in New Issue
Block a user