Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96351481
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
Wed, Dec 25, 18:15
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Dec 27, 18:15 (2 d)
Engine
blob
Format
Raw Data
Handle
23151976
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