Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893057
DifferentialTitleCommitMessageField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
DifferentialTitleCommitMessageField.php
View Options
<?php
final
class
DifferentialTitleCommitMessageField
extends
DifferentialCommitMessageField
{
const
FIELDKEY
=
'title'
;
public
function
getFieldName
(
)
{
return
pht
(
'Title'
)
;
}
public
function
getFieldOrder
(
)
{
return
1000
;
}
public
static
function
getDefaultTitle
(
)
{
return
pht
(
'<<Replace this line with your revision title>'
)
;
}
public
function
parseFieldValue
(
$value
)
{
if
(
$value
===
self
::
getDefaultTitle
(
)
)
{
$this
->
raiseParseException
(
pht
(
'Replace the default title line with a human-readable revision '
.
'title which describes the changes you are making.'
)
)
;
}
return
parent
::
parseFieldValue
(
$value
)
;
}
public
function
validateFieldValue
(
$value
)
{
if
(
!
strlen
(
$value
)
)
{
$this
->
raiseValidationException
(
pht
(
'You must provide a revision title in the first line '
.
'of your commit message.'
)
)
;
}
}
public
function
readFieldValueFromObject
(
DifferentialRevision
$revision
)
{
$value
=
$revision
->
getTitle
(
)
;
if
(
!
strlen
(
$value
)
)
{
return
self
::
getDefaultTitle
(
)
;
}
return
$value
;
}
public
function
getFieldTransactions
(
$value
)
{
return
array
(
array
(
'type'
=>
DifferentialRevisionTitleTransaction
::
EDITKEY
,
'value'
=>
$value
,
)
,
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 17:47 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127116
Default Alt Text
DifferentialTitleCommitMessageField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment