Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93253548
PhabricatorCalendarImportDeleteTransaction.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
Wed, Nov 27, 09:20
Size
735 B
Mime Type
text/x-php
Expires
Fri, Nov 29, 09:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22597397
Attached To
rPH Phabricator
PhabricatorCalendarImportDeleteTransaction.php
View Options
<?php
final
class
PhabricatorCalendarImportDeleteTransaction
extends
PhabricatorCalendarImportTransactionType
{
const
TRANSACTIONTYPE
=
'calendar.import.delete'
;
public
function
generateOldValue
(
$object
)
{
return
false
;
}
public
function
applyExternalEffects
(
$object
,
$value
)
{
$events
=
id
(
new
PhabricatorCalendarEventQuery
())
->
setViewer
(
$this
->
getActor
())
->
withImportSourcePHIDs
(
array
(
$object
->
getPHID
()))
->
execute
();
$engine
=
new
PhabricatorDestructionEngine
();
foreach
(
$events
as
$event
)
{
$engine
->
destroyObject
(
$event
);
}
}
public
function
getTitle
()
{
return
pht
(
'%s deleted imported events from this source.'
,
$this
->
renderAuthor
());
}
}
Event Timeline
Log In to Comment