3 final class NuanceSourceDefaultQueueTransaction
4 extends NuanceSourceTransactionType
{
6 const TRANSACTIONTYPE
= 'source.queue.default';
8 public function generateOldValue($object) {
9 return $object->getDefaultQueuePHID();
12 public function applyInternalEffects($object, $value) {
13 $object->setDefaultQueuePHID($value);
16 public function getTitle() {
18 '%s changed the default queue for this source from %s to %s.',
19 $this->renderAuthor(),
20 $this->renderOldHandle(),
21 $this->renderNewHandle());
24 public function validateTransactions($object, array $xactions) {
27 if (!$object->getDefaultQueuePHID() && !$xactions) {
28 $errors[] = $this->newRequiredError(
29 pht('Sources must have a default queue.'));
32 foreach ($xactions as $xaction) {
33 if (!$xaction->getNewValue()) {
34 $errors[] = $this->newRequiredError(
35 pht('Sources must have a default queue.'));