Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894025
PhabricatorFileDeleteTransaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
996 B
Referenced Files
None
Subscribers
None
PhabricatorFileDeleteTransaction.php
View Options
<?php
final
class
PhabricatorFileDeleteTransaction
extends
PhabricatorFileTransactionType
{
const
TRANSACTIONTYPE
=
'file:delete'
;
public
function
generateOldValue
(
$object
)
{
return
PhabricatorFile
::
STATUS_ACTIVE
;
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$file
=
$object
;
// Mark the file for deletion, save it, and schedule a worker to
// sweep by later and pick it up.
$file
->
setIsDeleted
(
true
)
;
PhabricatorWorker
::
scheduleTask
(
'FileDeletionWorker'
,
array
(
'objectPHID'
=>
$file
->
getPHID
(
)
)
,
array
(
'priority'
=>
PhabricatorWorker
::
PRIORITY_BULK
)
)
;
}
public
function
getIcon
(
)
{
return
'fa-ban'
;
}
public
function
getColor
(
)
{
return
'red'
;
}
public
function
getTitle
(
)
{
return
pht
(
'%s deleted this file.'
,
$this
->
renderAuthor
(
)
)
;
}
public
function
getTitleForFeed
(
)
{
return
pht
(
'%s deleted %s.'
,
$this
->
renderAuthor
(
)
,
$this
->
renderObject
(
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 19:16 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127872
Default Alt Text
PhabricatorFileDeleteTransaction.php (996 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment