Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93590137
PhabricatorCalendarExportNameTransaction.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
Fri, Nov 29, 23:54
Size
823 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 23:54 (2 d)
Engine
blob
Format
Raw Data
Handle
22669320
Attached To
rPH Phabricator
PhabricatorCalendarExportNameTransaction.php
View Options
<?php
final
class
PhabricatorCalendarExportNameTransaction
extends
PhabricatorCalendarExportTransactionType
{
const
TRANSACTIONTYPE
=
'calendar.export.name'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getName
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setName
(
$value
);
}
public
function
getTitle
()
{
return
pht
(
'%s renamed this export from %s to %s.'
,
$this
->
renderAuthor
(),
$this
->
renderOldValue
(),
$this
->
renderNewValue
());
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
if
(
$this
->
isEmptyTextTransaction
(
$object
->
getName
(),
$xactions
))
{
$errors
[]
=
$this
->
newRequiredError
(
pht
(
'Calendar exports must have a name.'
));
}
return
$errors
;
}
}
Event Timeline
Log In to Comment