Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81276261
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
Thu, Sep 5, 02:52
Size
855 B
Mime Type
text/x-php
Expires
Sat, Sep 7, 02:52 (1 d, 23 h)
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