GalleryNav.php 485 B

12345678910111213141516171819202122
  1. <?php
  2. class GalleryNav implements INavigationController{
  3. private $_uri;
  4. public function __construct() {
  5. $this->_uri=new URI("Gallery","/gallery","/images/photo.svg");
  6. }
  7. public function GetItems() {
  8. $repo=new AlbumRepository();
  9. $albums=$repo->GetAlbums();
  10. $uris=array();
  11. foreach ($albums as $a)
  12. $uris[]=new URI($a->AlbumTitle,'view/'.$a->AlbumUrl);
  13. $uris[]=new URI("<i>View all</i>","");
  14. return $uris;
  15. }
  16. public function GetURI() {
  17. return $this->_uri;
  18. }
  19. }