Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F114815239
ReleephAuthorFieldSpecification.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, May 27, 22:26
Size
1 KB
Mime Type
text/x-php
Expires
Thu, May 29, 22:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26439750
Attached To
rPH Phabricator
ReleephAuthorFieldSpecification.php
View Options
<?php
final
class
ReleephAuthorFieldSpecification
extends
ReleephFieldSpecification
{
private
static
$authorMap
=
array
();
public
function
getFieldKey
()
{
return
'author'
;
}
public
function
bulkLoad
(
array
$releeph_requests
)
{
foreach
(
$releeph_requests
as
$releeph_request
)
{
$commit
=
$releeph_request
->
loadPhabricatorRepositoryCommit
();
if
(
$commit
)
{
$author_phid
=
$commit
->
getAuthorPHID
();
self
::
$authorMap
[
$releeph_request
->
getPHID
()]
=
$author_phid
;
}
}
}
public
function
getName
()
{
return
'Author'
;
}
public
function
renderValueForHeaderView
()
{
$pull
=
$this
->
getReleephRequest
();
$commit
=
$pull
->
loadPhabricatorRepositoryCommit
();
if
(!
$commit
)
{
return
null
;
}
$author_phid
=
$commit
->
getAuthorPHID
();
if
(!
$author_phid
)
{
return
null
;
}
$handle
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$this
->
getUser
())
->
withPHIDs
(
array
(
$author_phid
))
->
executeOne
();
return
$handle
->
renderLink
();
}
}
Event Timeline
Log In to Comment