Differential D18000 Diff 43286 src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php
<?php | <?php | ||||
final class PhrictionDocumentMoveToTransaction | final class PhrictionDocumentMoveToTransaction | ||||
extends PhrictionDocumentTransactionType { | extends PhrictionDocumentTransactionType { | ||||
const TRANSACTIONTYPE = 'move-to'; | const TRANSACTIONTYPE = 'move-to'; | ||||
public function generateOldValue($object) { | public function generateOldValue($object) { | ||||
return null; | return null; | ||||
} | } | ||||
public function generateNewValue($object, $value) { | |||||
$document = $value; | |||||
$dict = array( | |||||
'id' => $document->getID(), | |||||
'phid' => $document->getPHID(), | |||||
'content' => $document->getContent()->getContent(), | |||||
'title' => $document->getContent()->getTitle(), | |||||
); | |||||
$editor = $this->getEditor(); | |||||
$editor->setMoveAwayDocument($document); | |||||
return $dict; | |||||
} | |||||
epriestley: Why is this OK to remove / being removed? | |||||
chadAuthorUnsubmitted Not Done Inline Actionswhoops chad: whoops | |||||
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) { | public function applyExternalEffects($object, $value) { | ||||
$dict = $value; | $dict = $value; | ||||
$this->getEditor()->getNewContent()->setContent($dict['content']); | $this->getEditor()->getNewContent()->setContent($dict['content']); | ||||
$this->getEditor()->getNewContent()->setTitle($dict['title']); | $this->getEditor()->getNewContent()->setTitle($dict['title']); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
Why is this OK to remove / being removed?