Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83158667
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 15, 12:25
Size
991 B
Mime Type
text/x-php
Expires
Tue, Sep 17, 12:25 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
20798921
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