Differential D17960 Diff 43196 src/applications/phriction/xaction/PhrictionDocumentTitleTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/xaction/PhrictionDocumentTitleTransaction.php
<?php | <?php | ||||
final class PhrictionDocumentTitleTransaction | final class PhrictionDocumentTitleTransaction | ||||
extends PhrictionDocumentTransactionType { | extends PhrictionDocumentTransactionType { | ||||
const TRANSACTIONTYPE = 'title'; | const TRANSACTIONTYPE = 'title'; | ||||
public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
if ($this->isNewObject()) { | if ($this->isNewObject()) { | ||||
return null; | return null; | ||||
} | } | ||||
return $this->getEditor()->getOldContent()->getTitle(); | return $this->getEditor()->getOldContent()->getTitle(); | ||||
} | } | ||||
public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
$object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); | $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); | ||||
} | |||||
public function applyExternalEffects($object, $value) { | |||||
chad: Seems to work in either place, but this was missed during conversion. | |||||
$this->getEditor()->getNewContent()->setTitle($value); | $this->getEditor()->getNewContent()->setTitle($value); | ||||
} | } | ||||
public function getActionStrength() { | public function getActionStrength() { | ||||
return 1.4; | return 1.4; | ||||
} | } | ||||
public function getActionName() { | public function getActionName() { | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |
Seems to work in either place, but this was missed during conversion.