Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103818849
ReleephRequestorFieldSpecification.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
Tue, Mar 4, 22:53
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Mar 6, 22:53 (2 d)
Engine
blob
Format
Raw Data
Handle
24661062
Attached To
rPH Phabricator
ReleephRequestorFieldSpecification.php
View Options
<?php
final
class
ReleephRequestorFieldSpecification
extends
ReleephFieldSpecification
{
public
function
getFieldKey
()
{
return
'requestor'
;
}
public
function
bulkLoad
(
array
$releeph_requests
)
{
$phids
=
mpull
(
$releeph_requests
,
'getRequestUserPHID'
);
ReleephUserView
::
getNewInstance
()
->
setUser
(
$this
->
getUser
())
->
setReleephProject
(
$this
->
getReleephProject
())
->
load
(
$phids
);
}
public
function
getName
()
{
return
'Requestor'
;
}
public
function
renderValueForHeaderView
()
{
$phid
=
$this
->
getReleephRequest
()->
getRequestUserPHID
();
return
ReleephUserView
::
getNewInstance
()
->
setRenderUserPHID
(
$phid
)
->
render
();
}
public
function
shouldAppearOnCommitMessage
()
{
return
true
;
}
public
function
shouldAppearOnRevertMessage
()
{
return
true
;
}
public
function
renderLabelForCommitMessage
()
{
return
"Requested By"
;
}
public
function
renderValueForCommitMessage
()
{
$phid
=
$this
->
getReleephRequest
()->
getRequestUserPHID
();
$handle
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$this
->
getUser
())
->
withPHIDs
(
array
(
$phid
))
->
executeOne
();
return
$handle
->
getName
();
}
}
Event Timeline
Log In to Comment