Navigation.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ g+9aR/HEfb0V/s3OWo8wHeJZf6sGDt6ooiPHFmHzoYk=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2014 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.0
  11. */
  12. /**
  13. * navigation menus generator class
  14. */
  15. namespace Cube;
  16. class Navigation extends Navigation\AbstractContainer
  17. {
  18. /**
  19. *
  20. * the path for the navigation view file(s)
  21. *
  22. * @var string
  23. */
  24. protected $_path;
  25. /**
  26. *
  27. * class constructor
  28. *
  29. * @param mixed $pages the navigation data (array or object of type Cube\Config)
  30. */
  31. public function __construct($pages = null)
  32. {
  33. if ($pages !== null) {
  34. $this->addPages($pages);
  35. }
  36. }
  37. /**
  38. *
  39. * get navigation partials path
  40. *
  41. * @return string
  42. */
  43. public function getPath()
  44. {
  45. return $this->_path;
  46. }
  47. /**
  48. *
  49. * set navigation partials path
  50. *
  51. * @param string $path
  52. * @return \Cube\Navigation
  53. */
  54. public function setPath($path)
  55. {
  56. $this->_path = $path;
  57. return $this;
  58. }
  59. }