Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F115220449
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
Fri, May 30, 13:32
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jun 1, 13:32 (2 d)
Engine
blob
Format
Raw Data
Handle
26477669
Attached To
rPH Phabricator
ReleephRequestorFieldSpecification.php
View Options
<?php
final
class
ReleephRequestorFieldSpecification
extends
ReleephFieldSpecification
{
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
hasSelectablePHIDs
()
{
return
true
;
}
public
function
getSelectTokenizerDatasource
()
{
return
'/typeahead/common/users/'
;
}
public
function
getSelectablePHIDs
()
{
return
array
(
$this
->
getReleephRequest
()->
getRequestUserPHID
(),
);
}
public
function
shouldAppearOnCommitMessage
()
{
return
true
;
}
public
function
shouldAppearOnRevertMessage
()
{
return
true
;
}
public
function
renderLabelForCommitMessage
()
{
return
"Requested By"
;
}
public
function
renderValueForCommitMessage
()
{
$phid
=
$this
->
getReleephRequest
()->
getRequestUserPHID
();
$handles
=
id
(
new
PhabricatorObjectHandleData
(
array
(
$phid
)))
->
setViewer
(
$this
->
getUser
())
->
loadHandles
();
return
$handles
[
$phid
]->
getName
();
}
}
Event Timeline
Log In to Comment