Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/storage/PholioMock.php
Show First 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | |||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */ | /* -( PhabricatorDestructibleInterface )----------------------------------- */ | ||||
public function destroyObjectPermanently( | public function destroyObjectPermanently( | ||||
PhabricatorDestructionEngine $engine) { | PhabricatorDestructionEngine $engine) { | ||||
$this->openTransaction(); | $this->openTransaction(); | ||||
$images = id(new PholioImage())->loadAllWhere( | $images = id(new PholioImageQuery()) | ||||
'mockID = %d', | ->setViewer($engine->getViewer()) | ||||
$this->getID()); | ->withMockIDs(array($this->getID())) | ||||
->execute(); | |||||
foreach ($images as $image) { | foreach ($images as $image) { | ||||
$image->delete(); | $image->delete(); | ||||
} | } | ||||
$this->delete(); | $this->delete(); | ||||
$this->saveTransaction(); | $this->saveTransaction(); | ||||
} | } | ||||
Show All 25 Lines |