Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F979157
DifferentialBranchFieldSpecification.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialBranchFieldSpecification.php
View Options
<?php
final
class
DifferentialBranchFieldSpecification
extends
DifferentialFieldSpecification
{
public
function
shouldAppearOnRevisionView
()
{
return
true
;
}
public
function
renderLabelForRevisionView
()
{
return
'Branch:'
;
}
public
function
renderValueForRevisionView
()
{
$diff
=
$this
->
getManualDiff
();
$branch
=
$diff
->
getBranch
();
$bookmark
=
$diff
->
getBookmark
();
$has_branch
=
(
$branch
!=
''
);
$has_bookmark
=
(
$bookmark
!=
''
);
if
(
$has_branch
&&
$has_bookmark
)
{
$branch
=
"{$bookmark} bookmark on {$branch} branch"
;
}
else
if
(
$has_bookmark
)
{
$branch
=
"{$bookmark} bookmark"
;
}
else
if
(!
$has_branch
)
{
return
null
;
}
return
$branch
;
}
public
function
renderValueForMail
(
$phase
)
{
$status
=
$this
->
getRevision
()->
getStatus
();
if
(
$status
!=
ArcanistDifferentialRevisionStatus
::
NEEDS_REVISION
&&
$status
!=
ArcanistDifferentialRevisionStatus
::
ACCEPTED
)
{
return
null
;
}
$diff
=
$this
->
getRevision
()->
loadActiveDiff
();
if
(
$diff
)
{
$branch
=
$diff
->
getBranch
();
if
(
$branch
)
{
return
"BRANCH
\n
$branch"
;
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 11:58 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
235916
Default Alt Text
DifferentialBranchFieldSpecification.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment