Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93124571
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
Tue, Nov 26, 09:32
Size
823 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 09:32 (2 d)
Engine
blob
Format
Raw Data
Handle
22577455
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