photo = $photo; } public function html_main() { $this->photoNav(); $this->photo(); echo '
'; $this->photoMeta(); echo '
'; $this->userActions(); echo '

', $this->photo->getTitle(), '

'; $this->printTags('Album', 'Album', false); $this->printTags('Tagged People', 'Person', true); echo '
'; } protected function photo() { echo '
'; if ($this->photo->isPortrait()) { echo '
', $this->photo->getInlineImage(null, 960, 'normal-photo'), $this->photo->getInlineImage(null, 960, 'blur-photo'), '
'; } else { $className = $this->photo->isPanorama() ? 'panorama-figure' : 'landscape-figure'; echo '
', $this->photo->getInlineImage(1280, null, 'normal-photo'), $this->photo->getInlineImage(1280, null, 'blur-photo'), '
'; } echo '
'; } public function setTag(Tag $tag) { $this->tag = $tag; } private function photoNav() { if ($previousUrl = $this->photo->getUrlForPreviousInSet($this->tag)) echo ' '; else echo ' '; if ($nextUrl = $this->photo->getUrlForNextInSet($this->tag)) echo ' '; else echo ' '; } private function photoMeta() { echo ' '; } private function printTags($header, $tagKind, $allowLinkingNewTags) { static $nextTagListId = 1; $tagListId = 'tagList' . ($nextTagListId++); echo '

', $header, '

'; $this->printNewTagScript($tagKind, $tagListId, $newTagId); } private function printNewTagScript($tagKind, $tagListId, $newTagId) { echo ' '; } public function setMetaData(array $metaData) { $this->metaData = $metaData; } public function userActions() { if (!$this->photo->isOwnedBy(Registry::get('user'))) return; echo '
Edit Delete
'; } }