Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92732104
DifferentialSummaryFieldSpecification.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
Sat, Nov 23, 05:56
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Nov 25, 05:56 (2 d)
Engine
blob
Format
Raw Data
Handle
22500398
Attached To
rPH Phabricator
DifferentialSummaryFieldSpecification.php
View Options
<?php
final
class
DifferentialSummaryFieldSpecification
extends
DifferentialFreeformFieldSpecification
{
private
$summary
=
''
;
public
function
shouldAppearOnEdit
()
{
return
true
;
}
protected
function
didSetRevision
()
{
$this
->
summary
=
(
string
)
$this
->
getRevision
()->
getSummary
();
}
public
function
setValueFromRequest
(
AphrontRequest
$request
)
{
$this
->
summary
=
$request
->
getStr
(
'summary'
);
return
$this
;
}
public
function
renderEditControl
()
{
return
id
(
new
AphrontFormTextAreaControl
())
->
setLabel
(
'Summary'
)
->
setName
(
'summary'
)
->
setValue
(
$this
->
summary
);
}
public
function
shouldExtractMentions
()
{
return
true
;
}
public
function
willWriteRevision
(
DifferentialRevisionEditor
$editor
)
{
$this
->
getRevision
()->
setSummary
(
$this
->
summary
);
}
public
function
shouldAppearOnCommitMessage
()
{
return
true
;
}
public
function
getCommitMessageKey
()
{
return
'summary'
;
}
public
function
setValueFromParsedCommitMessage
(
$value
)
{
$this
->
summary
=
(
string
)
$value
;
return
$this
;
}
public
function
shouldOverwriteWhenCommitMessageIsEdited
()
{
return
true
;
}
public
function
renderLabelForCommitMessage
()
{
return
'Summary'
;
}
public
function
renderValueForCommitMessage
(
$is_edit
)
{
return
$this
->
summary
;
}
public
function
parseValueFromCommitMessage
(
$value
)
{
return
(
string
)
$value
;
}
public
function
renderValueForMail
(
$phase
)
{
if
(
$phase
!=
DifferentialMailPhase
::
WELCOME
)
{
return
null
;
}
if
(
$this
->
summary
==
''
)
{
return
null
;
}
return
$this
->
summary
;
}
public
function
shouldAddToSearchIndex
()
{
return
true
;
}
public
function
getValueForSearchIndex
()
{
return
$this
->
summary
;
}
public
function
getKeyForSearchIndex
()
{
return
PhabricatorSearchField
::
FIELD_BODY
;
}
}
Event Timeline
Log In to Comment