Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/xaction/NuanceItemPropertyTransaction.php
| <?php | <?php | ||||
| final class NuanceItemPropertyTransaction | final class NuanceItemPropertyTransaction | ||||
| extends NuanceItemTransactionType { | extends NuanceItemTransactionType { | ||||
| const TRANSACTIONTYPE = 'nuance.item.property'; | const TRANSACTIONTYPE = 'nuance.item.property'; | ||||
| public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
| $property_key = NuanceItemTransaction::PROPERTY_KEY; | $property_key = NuanceItemTransaction::PROPERTY_KEY; | ||||
| $key = $this->getMetadataValue($property_key); | $key = $this->getMetadataValue($property_key); | ||||
| return $object->getNuanceProperty($key); | return $object->getItemProperty($key); | ||||
| } | } | ||||
| public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
| $property_key = NuanceItemTransaction::PROPERTY_KEY; | $property_key = NuanceItemTransaction::PROPERTY_KEY; | ||||
| $key = $this->getMetadataValue($property_key); | $key = $this->getMetadataValue($property_key); | ||||
| $object->setNuanceProperty($key, $value); | $object->setItemProperty($key, $value); | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| return pht( | return pht( | ||||
| '%s set a property on this item.', | '%s set a property on this item.', | ||||
| $this->renderAuthor()); | $this->renderAuthor()); | ||||
| } | } | ||||
| } | } | ||||