Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93593783
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
Sat, Nov 30, 00:37
Size
823 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 00:37 (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