2015-04-01 17:40:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class ManiphestCloseEmailCommand
|
|
|
|
extends ManiphestEmailCommand {
|
|
|
|
|
|
|
|
public function getCommand() {
|
|
|
|
return 'close';
|
|
|
|
}
|
|
|
|
|
2015-04-01 16:36:16 +02:00
|
|
|
public function getCommandSummary() {
|
|
|
|
return pht('Close a task.');
|
|
|
|
}
|
|
|
|
|
2015-04-01 17:40:42 +02:00
|
|
|
public function buildTransactions(
|
|
|
|
PhabricatorUser $viewer,
|
|
|
|
PhabricatorApplicationTransactionInterface $object,
|
|
|
|
PhabricatorMetaMTAReceivedMail $mail,
|
|
|
|
$command,
|
|
|
|
array $argv) {
|
|
|
|
$xactions = array();
|
|
|
|
|
|
|
|
$xactions[] = $object->getApplicationTransactionTemplate()
|
|
|
|
->setTransactionType(ManiphestTransaction::TYPE_STATUS)
|
|
|
|
->setNewValue(ManiphestTaskStatus::getDefaultClosedStatus());
|
|
|
|
|
|
|
|
return $xactions;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|