Path: blob/master/src/applications/nuance/xaction/NuanceSourceDefaultQueueTransaction.php
12256 views
<?php12final class NuanceSourceDefaultQueueTransaction3extends NuanceSourceTransactionType {45const TRANSACTIONTYPE = 'source.queue.default';67public function generateOldValue($object) {8return $object->getDefaultQueuePHID();9}1011public function applyInternalEffects($object, $value) {12$object->setDefaultQueuePHID($value);13}1415public function getTitle() {16return pht(17'%s changed the default queue for this source from %s to %s.',18$this->renderAuthor(),19$this->renderOldHandle(),20$this->renderNewHandle());21}2223public function validateTransactions($object, array $xactions) {24$errors = array();2526if (!$object->getDefaultQueuePHID() && !$xactions) {27$errors[] = $this->newRequiredError(28pht('Sources must have a default queue.'));29}3031foreach ($xactions as $xaction) {32if (!$xaction->getNewValue()) {33$errors[] = $this->newRequiredError(34pht('Sources must have a default queue.'));35}36}3738return $errors;39}4041}424344