Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/phid/PhabricatorPhamePostPHIDType.php
Show All 26 Lines | final class PhabricatorPhamePostPHIDType extends PhabricatorPHIDType { | ||||
public function loadHandles( | public function loadHandles( | ||||
PhabricatorHandleQuery $query, | PhabricatorHandleQuery $query, | ||||
array $handles, | array $handles, | ||||
array $objects) { | array $objects) { | ||||
foreach ($handles as $phid => $handle) { | foreach ($handles as $phid => $handle) { | ||||
$post = $objects[$phid]; | $post = $objects[$phid]; | ||||
$handle->setName($post->getTitle()); | $handle->setName($post->getTitle()); | ||||
$handle->setFullName($post->getTitle()); | $handle->setFullName(pht('Blog Post: ').$post->getTitle()); | ||||
$handle->setURI('/phame/post/view/'.$post->getID().'/'); | $handle->setURI('/J'.$post->getID()); | ||||
if ($post->isArchived()) { | if ($post->isArchived()) { | ||||
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); | $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |