All pastes #11735 Raw Edit

Miscellany

public php v1 · immutable
#11735 ·published 2005-05-14 14:07 UTC
rendered paste body
class Menu {  var $menu = array();  function Menu() {  }  function menuitem($type,$text,$link,$parent,$target) {    $item_no = count($this->menu);    $this->menu[$item_no]["id"]     = $item_no;    $this->menu[$item_no]["type"]   = $type;    $this->menu[$item_no]["text"]   = $text;    $this->menu[$item_no]["link"]   = $link;    $this->menu[$item_no]["target"] = $target;    $this->menu[$item_no]["parent"] = $parent;  }  function add_item($text,$link,$target) {    $this->menuitem("top",$text,$link,0,$target);  }  function add_subitem($text,$link,$parent,$target) {    $this->menuitem("sub",$text,$link,$parent,$target);  }    function get_menu() {    return $this->menu;  }}