Page MenuHomestyx hydra

AlmanacDevicePHIDType.php
No OneTemporary

AlmanacDevicePHIDType.php

<?php
final class AlmanacDevicePHIDType extends PhabricatorPHIDType {
const TYPECONST = 'ADEV';
public function getTypeName() {
return pht('Almanac Device');
}
public function newObject() {
return new AlmanacDevice();
}
public function getPHIDTypeApplicationClass() {
return PhabricatorAlmanacApplication::class;
}
protected function buildQueryForObjects(
PhabricatorObjectQuery $query,
array $phids) {
return id(new AlmanacDeviceQuery())
->withPHIDs($phids);
}
public function loadHandles(
PhabricatorHandleQuery $query,
array $handles,
array $objects) {
foreach ($handles as $phid => $handle) {
$device = $objects[$phid];
$id = $device->getID();
$name = $device->getName();
$handle->setObjectName(pht('Device %d', $id));
$handle->setName($name);
$handle->setURI($device->getURI());
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Feb 6, 2:10 AM (11 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33920
Default Alt Text
AlmanacDevicePHIDType.php (910 B)

Event Timeline