Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98402908
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
Sun, Jan 12, 21:44
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 14, 21:44 (2 d)
Engine
blob
Format
Raw Data
Handle
23577362
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