Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F449350
PhabricatorCalendarEventRecurringTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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
isInheritedEdit
()
{
return
false
;
}
public
function
shouldHide
()
{
// This event isn't interesting on its own, and is accompanied by an
// "alice set this event to repeat weekly." event in normal circumstances
// anyway.
return
true
;
}
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 7:19 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
66787
Default Alt Text
PhabricatorCalendarEventRecurringTransaction.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment