public function destroyObjectPermanently(PhabricatorDestructionEngine $engine) { $awards = id(new PhabricatorBadgesAwardQuery())->setViewer($engine->getViewer())->withBadgePHIDs(array($this->getPHID()))->execute(); foreach ($awards as $award) { $engine->destroyObjectPermanently($award); } $this->openTransaction(); $this->delete(); $this->saveTransaction(); }