3 final class PhabricatorFileDeleteTransaction
4 extends PhabricatorFileTransactionType
{
6 const TRANSACTIONTYPE
= 'file:delete';
8 public function generateOldValue($object) {
9 return PhabricatorFile
::STATUS_ACTIVE
;
12 public function applyInternalEffects($object, $value) {
14 // Mark the file for deletion, save it, and schedule a worker to
15 // sweep by later and pick it up.
16 $file->setIsDeleted(true);
18 PhabricatorWorker
::scheduleTask(
20 array('objectPHID' => $file->getPHID()),
21 array('priority' => PhabricatorWorker
::PRIORITY_BULK
));
24 public function getIcon() {
28 public function getColor() {
32 public function getTitle() {
34 '%s deleted this file.',
35 $this->renderAuthor());
38 public function getTitleForFeed() {
41 $this->renderAuthor(),
42 $this->renderObject());