Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81247894
PhortuneProductPHIDType.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
Wed, Sep 4, 23:15
Size
855 B
Mime Type
text/x-php
Expires
Fri, Sep 6, 23:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20536498
Attached To
rPH Phabricator
PhortuneProductPHIDType.php
View Options
<?php
final
class
PhortuneProductPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'PDCT'
;
public
function
getTypeName
()
{
return
pht
(
'Phortune Product'
);
}
public
function
newObject
()
{
return
new
PhortuneProduct
();
}
public
function
getPHIDTypeApplicationClass
()
{
return
'PhabricatorPhortuneApplication'
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PhortuneProductQuery
())
->
withPHIDs
(
$phids
);
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$product
=
$objects
[
$phid
];
$id
=
$product
->
getID
();
$handle
->
setName
(
pht
(
'Product %d'
,
$id
));
$handle
->
setURI
(
"/phortune/product/{$id}/"
);
}
}
}
Event Timeline
Log In to Comment