Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81812585
DrydockBlueprintPHIDType.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
Sun, Sep 8, 01:45
Size
1007 B
Mime Type
text/x-php
Expires
Tue, Sep 10, 01:45 (2 d)
Engine
blob
Format
Raw Data
Handle
20622241
Attached To
rPH Phabricator
DrydockBlueprintPHIDType.php
View Options
<?php
final
class
DrydockBlueprintPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'DRYB'
;
public
function
getTypeName
()
{
return
pht
(
'Blueprint'
);
}
public
function
getTypeIcon
()
{
return
'fa-map-o'
;
}
public
function
newObject
()
{
return
new
DrydockBlueprint
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorDrydockApplication'
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
DrydockBlueprintQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$blueprint
=
$objects
[
$phid
];
$id
=
$blueprint
->
getID
();
$name
=
$blueprint
->
getBlueprintName
();
$handle
->
setName
(
$name
)
->
setFullName
(
pht
(
'Blueprint %d: %s'
,
$id
,
$name
))
->
setURI
(
"/drydock/blueprint/{$id}/"
);
}
}
}
Event Timeline
Log In to Comment