1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-04 20:52:43 +01:00
phorge-phorge/src/applications/maniphest/command/ManiphestCloseEmailCommand.php

34 lines
844 B
PHP
Raw Normal View History

<?php
final class ManiphestCloseEmailCommand
extends ManiphestEmailCommand {
public function getCommand() {
return 'close';
}
public function getCommandSummary() {
return pht(
'Close a task. This changes the task status to the default closed '.
'status. For a more powerful (but less concise) way to change task '.
'statuses, see `%s`.',
'!status');
}
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;
}
}