Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhamePost.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | final class PhamePost extends PhameDAO | ||||
} | } | ||||
public function getViewURI() { | public function getViewURI() { | ||||
$id = $this->getID(); | $id = $this->getID(); | ||||
$slug = $this->getSlug(); | $slug = $this->getSlug(); | ||||
return "/phame/post/view/{$id}/{$slug}/"; | return "/phame/post/view/{$id}/{$slug}/"; | ||||
} | } | ||||
public function getBestURI($is_live, $is_external) { | |||||
if ($is_live) { | |||||
if ($is_external) { | |||||
return $this->getExternalLiveURI(); | |||||
} else { | |||||
return $this->getInternalLiveURI(); | |||||
} | |||||
} else { | |||||
return $this->getViewURI(); | |||||
} | |||||
} | |||||
public function getEditURI() { | public function getEditURI() { | ||||
return '/phame/post/edit/'.$this->getID().'/'; | return '/phame/post/edit/'.$this->getID().'/'; | ||||
} | } | ||||
public function isDraft() { | public function isDraft() { | ||||
return ($this->getVisibility() == PhameConstants::VISIBILITY_DRAFT); | return ($this->getVisibility() == PhameConstants::VISIBILITY_DRAFT); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |