Page MenuHomePhorge

DivinerBookPHIDType.php
No OneTemporary

DivinerBookPHIDType.php

<?php
final class DivinerBookPHIDType extends PhabricatorPHIDType {
const TYPECONST = 'BOOK';
public function getTypeName() {
return pht('Diviner Book');
}
public function newObject() {
return new DivinerLiveBook();
}
public function getTypeIcon() {
return 'fa-book';
}
public function getPHIDTypeApplicationClass() {
return PhabricatorDivinerApplication::class;
}
protected function buildQueryForObjects(
PhabricatorObjectQuery $query,
array $phids) {
return id(new DivinerBookQuery())
->withPHIDs($phids);
}
public function loadHandles(
PhabricatorHandleQuery $query,
array $handles,
array $objects) {
foreach ($handles as $phid => $handle) {
$book = $objects[$phid];
$name = $book->getName();
$handle
->setName($book->getShortTitle())
->setFullName($book->getTitle())
->setURI("/book/{$name}/");
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Jan 19 2025, 15:26 (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1125979
Default Alt Text
DivinerBookPHIDType.php (940 B)

Event Timeline