Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F69317758
HarbormasterBuildTargetPHIDType.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
Mon, Jul 1, 06:21
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jul 3, 06:21 (2 d)
Engine
blob
Format
Raw Data
Handle
18643959
Attached To
rPH Phabricator
HarbormasterBuildTargetPHIDType.php
View Options
<?php
final
class
HarbormasterBuildTargetPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'HMBT'
;
public
function
getTypeName
()
{
return
pht
(
'Build Target'
);
}
public
function
newObject
()
{
return
new
HarbormasterBuildTarget
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorHarbormasterApplication'
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
HarbormasterBuildTargetQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$target
=
$objects
[
$phid
];
$target_id
=
$target
->
getID
();
// Build target don't currently have their own page, so just point
// the user at the build until we have one.
$build
=
$target
->
getBuild
();
$build_id
=
$build
->
getID
();
$uri
=
"/harbormaster/build/{$build_id}/"
;
$handle
->
setName
(
pht
(
'Build Target %d'
,
$target_id
));
$handle
->
setURI
(
$uri
);
}
}
}
Event Timeline
Log In to Comment