Source for file SubMenu.class.php

Documentation is available at SubMenu.class.php

  1. <?php
  2. /**
  3. * @since 9/21/06
  4. * @package harmoni.gui.components
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: SubMenu.class.php,v 1.3 2007/09/04 20:25:22 adamfranco Exp $
  10. */
  11.  
  12. /**
  13. * <##>
  14. *
  15. * @since 9/21/06
  16. * @package harmoni.gui.components
  17. *
  18. * @copyright Copyright &copy; 2005, Middlebury College
  19. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  20. *
  21. * @version $Id: SubMenu.class.php,v 1.3 2007/09/04 20:25:22 adamfranco Exp $
  22. */
  23. class SubMenu
  24. extends Menu
  25. {
  26. /**
  27. * The constructor.
  28. * @access public
  29. * @param ref object layout The <code>Layout</code> of this container.
  30. * @param integer index The index of this component. The index has no semantic meaning:
  31. * you can think of the index as 'level' of the component. Alternatively,
  32. * the index could serve as means of distinguishing between components with
  33. * the same type. Most often one would use the index in conjunction with
  34. * the <code>getStylesForComponentType()</code> and
  35. * <code>addStyleForComponentType()</code> methods.
  36. * @param optional object StyleCollections styles,... Zero, one, or more StyleCollection
  37. * objects that will be added to the newly created Component. Warning, this will
  38. * result in copying the objects instead of referencing them as using
  39. * <code>addStyle()</code> would do.
  40. ***/
  41. function SubMenu($layout, $index) {
  42. $this->Container($layout, SUB_MENU, $index);
  43. $this->_selectedId = null;
  44.  
  45. // if there are style collections to add
  46. if (func_num_args() > 2)
  47. for ($i = 2; $i < func_num_args(); $i++)
  48. $this->addStyle(func_get_arg($i));
  49. }
  50. }
  51.  
  52. ?>

Documentation generated on Wed, 19 Sep 2007 10:27:00 -0400 by phpDocumentor 1.3.0RC3