/**
  * Constructor
  *
  * @param object $structure The menu structure
  * @param array  $options   Options whic affect the display of the listbox.
  *                          These can consist of:
  *                           o promoText  The text that appears at the the top of the listbox
  *                                        Defaults to "Select..."
  *                           o indentChar The character to use for indenting the nodes
  *                                        Defaults to " "
  *                           o indentNum  How many of the indentChars to use per indentation level
  *                                        Defaults to 2
  *                           o linkTarget Target for the links. Defaults to "_self"
  *                           o submitText Text for the submit button. Defaults to "Go"
  */
 function __construct($structure, $options = array())
 {
     parent::__construct($structure);
     $this->promoText = 'Select...';
     $this->indentChar = ' ';
     $this->indentNum = 2;
     $this->linkTarget = '_self';
     $this->submitText = 'Go';
     foreach ($options as $option => $value) {
         $this->{$option} = $value;
     }
 }
Example #2
0
 /**
  * Constructor, takes the tree structure as
  * an argument and an array of options which
  * can consist of:
  *  o isDynamic  Defines menu wide dynamic status
  *
  * @param object $structure The menu structure
  * @param array  $options   Array of options
  */
 function HTML_TreeMenu_DHTML($structure, $options = array())
 {
     $this->defaultProperties['isDynamic'] = true;
     HTML_TreeMenu_Presentation::HTML_TreeMenu_Presentation($structure, $options);
 }