Page MenuHomePhorge

PhabricatorPhamePostPHIDType.php
No OneTemporary

PhabricatorPhamePostPHIDType.php

<?php
final class PhabricatorPhamePostPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'POST';
public function getTypeName() {
return pht('Phame Post');
}
public function newObject() {
return new PhamePost();
}
public function getPHIDTypeApplicationClass() {
return PhabricatorPhameApplication::class;
}
protected function buildQueryForObjects(
PhabricatorObjectQuery $query,
array $phids) {
return id(new PhamePostQuery())
->withPHIDs($phids);
}
public function loadHandles(
PhabricatorHandleQuery $query,
array $handles,
array $objects) {
foreach ($handles as $phid => $handle) {
$post = $objects[$phid];
$handle->setName($post->getTitle());
$handle->setFullName(pht('Blog Post: ').$post->getTitle());
$handle->setURI('/J'.$post->getID());
if ($post->isArchived()) {
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Jan 19, 17:56 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127185
Default Alt Text
PhabricatorPhamePostPHIDType.php (974 B)

Event Timeline