Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96122585
PhabricatorPhurlURLNameTransaction.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
Sun, Dec 22, 21:28
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Dec 24, 21:28 (2 d)
Engine
blob
Format
Raw Data
Handle
23127218
Attached To
rPH Phabricator
PhabricatorPhurlURLNameTransaction.php
View Options
<?php
final
class
PhabricatorPhurlURLNameTransaction
extends
PhabricatorPhurlURLTransactionType
{
const
TRANSACTIONTYPE
=
'phurl.name'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getName
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setName
(
$value
);
}
public
function
getTitle
()
{
return
pht
(
'%s changed the name of the URL from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderOldValue
(),
$this
->
renderNewValue
());
}
public
function
getTitleForFeed
()
{
return
pht
(
'%s changed the name of %s from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderObject
(),
$this
->
renderOldValue
(),
$this
->
renderNewValue
());
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
if
(
$this
->
isEmptyTextTransaction
(
$object
->
getName
(),
$xactions
))
{
$errors
[]
=
$this
->
newRequiredError
(
pht
(
'Phurls must have a name.'
));
}
return
$errors
;
}
}
Event Timeline
Log In to Comment