Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72593991
DivinerBookPHIDType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 16, 01:25
Size
935 B
Mime Type
text/x-php
Expires
Thu, Jul 18, 01:25 (2 d)
Engine
blob
Format
Raw Data
Handle
19075117
Attached To
rPH Phabricator
DivinerBookPHIDType.php
View Options
<?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'
;
}
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}/"
);
}
}
}
Event Timeline
Log In to Comment