Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/command/NuanceTrashCommand.php
- This file was added.
| <?php | |||||
| final class NuanceTrashCommand | |||||
| extends NuanceCommandImplementation { | |||||
| const COMMANDKEY = 'trash'; | |||||
| public function getCommandName() { | |||||
| return pht('Throw in Trash'); | |||||
| } | |||||
| public function canApplyToItem(NuanceItem $item) { | |||||
| $type = $item->getImplementation(); | |||||
| return ($type instanceof NuanceFormItemType); | |||||
| } | |||||
| protected function executeCommand( | |||||
| NuanceItem $item, | |||||
| NuanceItemCommand $command) { | |||||
| $this->newStatusTransaction(NuanceItem::STATUS_CLOSED); | |||||
| } | |||||
| } | |||||