@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 29 lines 611 B view raw
1<?php 2 3final class NuanceTrashCommand 4 extends NuanceCommandImplementation { 5 6 const COMMANDKEY = 'trash'; 7 8 public function getCommandName() { 9 return pht('Throw in Trash'); 10 } 11 12 public function canApplyToItem(NuanceItem $item) { 13 $type = $item->getImplementation(); 14 return ($type instanceof NuanceFormItemType); 15 } 16 17 public function canApplyImmediately( 18 NuanceItem $item, 19 NuanceItemCommand $command) { 20 return true; 21 } 22 23 protected function executeCommand( 24 NuanceItem $item, 25 NuanceItemCommand $command) { 26 $this->newStatusTransaction(NuanceItem::STATUS_CLOSED); 27 } 28 29}