Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2991580
PhabricatorBadgesPHIDType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
976 B
Referenced Files
None
Subscribers
None
PhabricatorBadgesPHIDType.php
View Options
<?php
final
class
PhabricatorBadgesPHIDType
extends
PhabricatorPHIDType
{
const
TYPECONST
=
'BDGE'
;
public
function
getTypeName
(
)
{
return
pht
(
'Badge'
)
;
}
public
function
newObject
(
)
{
return
new
PhabricatorBadgesBadge
(
)
;
}
public
function
getPHIDTypeApplicationClass
(
)
{
return
PhabricatorBadgesApplication
::
class
;
}
protected
function
buildQueryForObjects
(
PhabricatorObjectQuery
$query
,
array
$phids
)
{
return
id
(
new
PhabricatorBadgesQuery
(
)
)
->
withPHIDs
(
$phids
)
;
}
public
function
loadHandles
(
PhabricatorHandleQuery
$query
,
array
$handles
,
array
$objects
)
{
foreach
(
$handles
as
$phid
=>
$handle
)
{
$badge
=
$objects
[
$phid
]
;
$id
=
$badge
->
getID
(
)
;
$name
=
$badge
->
getName
(
)
;
if
(
$badge
->
isArchived
(
)
)
{
$handle
->
setStatus
(
PhabricatorObjectHandle
::
STATUS_CLOSED
)
;
}
$handle
->
setName
(
$name
)
;
$handle
->
setURI
(
"/badges/view/{$id}/"
)
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 23, 02:35 (1 d, 9 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1180861
Default Alt Text
PhabricatorBadgesPHIDType.php (976 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment