Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81868468
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
Sun, Sep 8, 08:42
Size
991 B
Mime Type
text/x-php
Expires
Tue, Sep 10, 08:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20624217
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
getTypeIcon
()
{
return
'fa-map'
;
}
public
function
newObject
()
{
return
new
DrydockResource
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorDrydockApplication'
;
}
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
->
getResourceName
()));
$handle
->
setURI
(
"/drydock/resource/{$id}/"
);
}
}
}
Event Timeline
Log In to Comment