Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74850143
DrydockResourcePHIDType.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 30, 01:16
Size
824 B
Mime Type
text/x-php
Expires
Thu, Aug 1, 01:16 (2 d)
Engine
blob
Format
Raw Data
Handle
19443479
Attached To
rPH Phabricator
DrydockResourcePHIDType.php
View Options
<?php
final
class
DrydockResourcePHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'DRYR'
;
public
function
getTypeName
()
{
return
pht
(
'Drydock Resource'
);
}
public
function
newObject
()
{
return
new
DrydockResource
();
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
DrydockResourceQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$resource
=
$objects
[
$phid
];
$id
=
$resource
->
getID
();
$handle
->
setName
(
pht
(
'Resource %d: %s'
,
$id
,
$resource
->
getName
()));
$handle
->
setURI
(
"/drydock/resource/{$id}/"
);
}
}
}
Event Timeline
Log In to Comment