Page MenuHomestyx hydra

DivinerAtomPHIDType.php
No OneTemporary

DivinerAtomPHIDType.php

<?php
final class DivinerAtomPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'ATOM';
public function getTypeName() {
return pht('Diviner Atom');
}
public function newObject() {
return new DivinerLiveSymbol();
}
public function getTypeIcon() {
return 'fa-cube';
}
public function getPHIDTypeApplicationClass() {
return PhabricatorDivinerApplication::class;
}
protected function buildQueryForObjects(
PhabricatorObjectQuery $query,
array $phids) {
return id(new DivinerAtomQuery())
->withPHIDs($phids);
}
public function loadHandles(
PhabricatorHandleQuery $query,
array $handles,
array $objects) {
foreach ($handles as $phid => $handle) {
$atom = $objects[$phid];
$book = $atom->getBook()->getName();
$name = $atom->getName();
$type = $atom->getType();
$handle
->setName($atom->getName())
->setTitle($atom->getTitle())
->setURI("/book/{$book}/{$type}/{$name}/")
->setStatus($atom->getGraphHash()
? PhabricatorObjectHandle::STATUS_OPEN
: PhabricatorObjectHandle::STATUS_CLOSED);
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Nov 6, 4:43 AM (12 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
321605
Default Alt Text
DivinerAtomPHIDType.php (1 KB)

Event Timeline