3 final class HarbormasterBuildPlanNameTransaction
4 extends HarbormasterBuildPlanTransactionType
{
6 const TRANSACTIONTYPE
= 'harbormaster:name';
8 public function generateOldValue($object) {
9 return $object->getName();
12 public function applyInternalEffects($object, $value) {
13 $object->setName($value);
16 public function getTitle() {
18 '%s renamed this build plan from "%s" to "%s".',
19 $this->renderAuthor(),
20 $this->renderOldValue(),
21 $this->renderNewValue());
24 public function validateTransactions($object, array $xactions) {
27 if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
28 $errors[] = $this->newRequiredError(
29 pht('You must choose a name for your build plan.'));
35 public function getTransactionTypeForConduit($xaction) {
39 public function getFieldValuesForConduit($xaction, $data) {
41 'old' => $xaction->getOldValue(),
42 'new' => $xaction->getNewValue(),