Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F452915
LegalpadDocumentTextTransaction.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
LegalpadDocumentTextTransaction.php
View Options
<?php
final
class
LegalpadDocumentTextTransaction
extends
LegalpadDocumentTransactionType
{
const
TRANSACTIONTYPE
=
'text'
;
public
function
generateOldValue
(
$object
)
{
$body
=
$object
->
getDocumentBody
();
return
$body
->
getText
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$body
=
$object
->
getDocumentBody
();
$body
->
setText
(
$value
);
$object
->
attachDocumentBody
(
$body
);
}
public
function
getTitle
()
{
$old
=
$this
->
getOldValue
();
if
(!
strlen
(
$old
))
{
return
pht
(
'%s set the document text.'
,
$this
->
renderAuthor
());
}
else
{
return
pht
(
'%s updated the document text.'
,
$this
->
renderAuthor
());
}
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s updated the document text for %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
());
}
public
function
hasChangeDetailView
()
{
return
true
;
}
public
function
getMailDiffSectionHeader
()
{
return
pht
(
'CHANGES TO DOCUMENT TEXT'
);
}
public
function
newChangeDetailView
()
{
$viewer
=
$this
->
getViewer
();
return
id
(
new
PhabricatorApplicationTransactionTextDiffDetailView
())
->
setViewer
(
$viewer
)
->
setOldText
(
$this
->
getOldValue
())
->
setNewText
(
$this
->
getNewValue
());
}
public
function
newRemarkupChanges
()
{
$changes
=
array
();
$changes
[]
=
$this
->
newRemarkupChange
()
->
setOldValue
(
$this
->
getOldValue
())
->
setNewValue
(
$this
->
getNewValue
());
return
$changes
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 1:37 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
68588
Default Alt Text
LegalpadDocumentTextTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment