Page MenuHomestyx hydra

HeraldWebhookPHIDType.php
No OneTemporary

HeraldWebhookPHIDType.php

<?php
final class HeraldWebhookPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'HWBH';
public function getTypeName() {
return pht('Webhook');
}
public function newObject() {
return new HeraldWebhook();
}
public function getPHIDTypeApplicationClass() {
return PhabricatorHeraldApplication::class;
}
protected function buildQueryForObjects(
PhabricatorObjectQuery $query,
array $phids) {
return id(new HeraldWebhookQuery())
->withPHIDs($phids);
}
public function loadHandles(
PhabricatorHandleQuery $query,
array $handles,
array $objects) {
foreach ($handles as $phid => $handle) {
$hook = $objects[$phid];
$name = $hook->getName();
$id = $hook->getID();
$handle
->setName($name)
->setURI($hook->getURI())
->setFullName(pht('Webhook %d %s', $id, $name));
if ($hook->isDisabled()) {
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
}
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Feb 6, 1:17 AM (8 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33705
Default Alt Text
HeraldWebhookPHIDType.php (1010 B)

Event Timeline