Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99311853
FlagConduitAPIMethod.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, Jan 23, 08:54
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jan 25, 08:54 (2 d)
Engine
blob
Format
Raw Data
Handle
23774568
Attached To
rPH Phabricator
FlagConduitAPIMethod.php
View Options
<?php
abstract
class
FlagConduitAPIMethod
extends
ConduitAPIMethod
{
final
public
function
getApplication
()
{
return
PhabricatorApplication
::
getByClass
(
'PhabricatorFlagsApplication'
);
}
protected
function
attachHandleToFlag
(
$flag
,
PhabricatorUser
$user
)
{
$handle
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$user
)
->
withPHIDs
(
array
(
$flag
->
getObjectPHID
()))
->
executeOne
();
$flag
->
attachHandle
(
$handle
);
}
protected
function
buildFlagInfoDictionary
(
$flag
)
{
$color
=
$flag
->
getColor
();
$uri
=
PhabricatorEnv
::
getProductionURI
(
$flag
->
getHandle
()->
getURI
());
return
array
(
'id'
=>
$flag
->
getID
(),
'ownerPHID'
=>
$flag
->
getOwnerPHID
(),
'type'
=>
$flag
->
getType
(),
'objectPHID'
=>
$flag
->
getObjectPHID
(),
'reasonPHID'
=>
$flag
->
getReasonPHID
(),
'color'
=>
$color
,
'colorName'
=>
PhabricatorFlagColor
::
getColorName
(
$color
),
'note'
=>
$flag
->
getNote
(),
'handle'
=>
array
(
'uri'
=>
$uri
,
'name'
=>
$flag
->
getHandle
()->
getName
(),
'fullname'
=>
$flag
->
getHandle
()->
getFullName
(),
),
'dateCreated'
=>
$flag
->
getDateCreated
(),
'dateModified'
=>
$flag
->
getDateModified
(),
);
}
}
Event Timeline
Log In to Comment