3 final class PhortunePaymentMethodNameTransaction
4 extends PhortunePaymentMethodTransactionType
{
6 const TRANSACTIONTYPE
= 'name';
8 public function generateOldValue($object) {
9 return $object->getName();
12 public function applyInternalEffects($object, $value) {
13 $object->setName($value);
16 public function getTitle() {
17 $old_value = $this->getOldValue();
18 $new_value = $this->getNewValue();
20 if (strlen($old_value) && strlen($new_value)) {
22 '%s renamed this payment method from %s to %s.',
23 $this->renderAuthor(),
24 $this->renderOldValue(),
25 $this->renderNewValue());
26 } else if (strlen($new_value)) {
28 '%s set the name of this payment method to %s.',
29 $this->renderAuthor(),
30 $this->renderNewValue());
33 '%s removed the name of this payment method (was: %s).',
34 $this->renderAuthor(),
35 $this->renderOldValue());