Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93128438
PhabricatorCalendarEventRecurringTransaction.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, 10:16
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 10:16 (2 d)
Engine
blob
Format
Raw Data
Handle
22580685
Attached To
rPH Phabricator
PhabricatorCalendarEventRecurringTransaction.php
View Options
<?php
final
class
PhabricatorCalendarEventRecurringTransaction
extends
PhabricatorCalendarEventTransactionType
{
const
TRANSACTIONTYPE
=
'calendar.recurring'
;
public
function
generateOldValue
(
$object
)
{
return
(
int
)
$object
->
getIsRecurring
();
}
public
function
generateNewValue
(
$object
,
$value
)
{
return
(
int
)
$value
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$object
->
setIsRecurring
(
$value
);
}
public
function
validateTransactions
(
$object
,
array
$xactions
)
{
$errors
=
array
();
$old
=
$object
->
getIsRecurring
();
foreach
(
$xactions
as
$xaction
)
{
if
(
$this
->
isNewObject
())
{
continue
;
}
if
(
$xaction
->
getNewValue
()
==
$old
)
{
continue
;
}
if
(
$xaction
->
getNewValue
())
{
continue
;
}
$errors
[]
=
$this
->
newInvalidError
(
pht
(
'An event can not be stopped from recurring once it has been '
.
'made recurring. You can cancel the event.'
),
$xaction
);
}
return
$errors
;
}
}
Event Timeline
Log In to Comment