Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/nuance/command/NuanceTrashCommand.php
12256 views
1
<?php
2
3
final 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
}
30
31