Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialDiff.php
| Show First 20 Lines • Show All 710 Lines • ▼ Show 20 Lines | |||||
| /* -( PhabricatorDestructibleInterface )----------------------------------- */ | /* -( PhabricatorDestructibleInterface )----------------------------------- */ | ||||
| public function destroyObjectPermanently( | public function destroyObjectPermanently( | ||||
| PhabricatorDestructionEngine $engine) { | PhabricatorDestructionEngine $engine) { | ||||
| $viewer = $engine->getViewer(); | |||||
| $this->openTransaction(); | $this->openTransaction(); | ||||
| $this->delete(); | $this->delete(); | ||||
| foreach ($this->loadChangesets() as $changeset) { | foreach ($this->loadChangesets() as $changeset) { | ||||
| $engine->destroyObject($changeset); | $engine->destroyObject($changeset); | ||||
| } | } | ||||
| $properties = id(new DifferentialDiffProperty())->loadAllWhere( | $properties = id(new DifferentialDiffProperty())->loadAllWhere( | ||||
| 'diffID = %d', | 'diffID = %d', | ||||
| $this->getID()); | $this->getID()); | ||||
| foreach ($properties as $prop) { | foreach ($properties as $prop) { | ||||
| $prop->delete(); | $prop->delete(); | ||||
| } | } | ||||
| $viewstates = id(new DifferentialViewStateQuery()) | |||||
| ->setViewer($viewer) | |||||
| ->withObjectPHIDs(array($this->getPHID())); | |||||
| foreach ($viewstates as $viewstate) { | |||||
| $viewstate->delete(); | |||||
| } | |||||
| $this->saveTransaction(); | $this->saveTransaction(); | ||||
| } | } | ||||
| /* -( PhabricatorConduitResultInterface )---------------------------------- */ | /* -( PhabricatorConduitResultInterface )---------------------------------- */ | ||||
| public function getFieldSpecificationsForConduit() { | public function getFieldSpecificationsForConduit() { | ||||
| ▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines | |||||