Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProject.php
<?php | <?php | ||||
final class PhabricatorProject extends PhabricatorProjectDAO | final class PhabricatorProject extends PhabricatorProjectDAO | ||||
implements | implements | ||||
PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorFlaggableInterface, | PhabricatorFlaggableInterface, | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorSubscribableInterface, | PhabricatorSubscribableInterface, | ||||
PhabricatorCustomFieldInterface, | PhabricatorCustomFieldInterface, | ||||
PhabricatorDestructibleInterface { | PhabricatorDestructibleInterface, | ||||
PhabricatorFulltextInterface { | |||||
protected $name; | protected $name; | ||||
protected $status = PhabricatorProjectStatus::STATUS_ACTIVE; | protected $status = PhabricatorProjectStatus::STATUS_ACTIVE; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $primarySlug; | protected $primarySlug; | ||||
protected $profileImagePHID; | protected $profileImagePHID; | ||||
protected $icon; | protected $icon; | ||||
protected $color; | protected $color; | ||||
▲ Show 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | public function willRenderTimeline( | ||||
AphrontRequest $request) { | AphrontRequest $request) { | ||||
return $timeline; | return $timeline; | ||||
} | } | ||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */ | /* -( PhabricatorDestructibleInterface )----------------------------------- */ | ||||
public function destroyObjectPermanently( | public function destroyObjectPermanently( | ||||
PhabricatorDestructionEngine $engine) { | PhabricatorDestructionEngine $engine) { | ||||
$this->openTransaction(); | $this->openTransaction(); | ||||
$this->delete(); | $this->delete(); | ||||
$columns = id(new PhabricatorProjectColumn()) | $columns = id(new PhabricatorProjectColumn()) | ||||
->loadAllWhere('projectPHID = %s', $this->getPHID()); | ->loadAllWhere('projectPHID = %s', $this->getPHID()); | ||||
foreach ($columns as $column) { | foreach ($columns as $column) { | ||||
$engine->destroyObject($column); | $engine->destroyObject($column); | ||||
} | } | ||||
$slugs = id(new PhabricatorProjectSlug()) | $slugs = id(new PhabricatorProjectSlug()) | ||||
->loadAllWhere('projectPHID = %s', $this->getPHID()); | ->loadAllWhere('projectPHID = %s', $this->getPHID()); | ||||
foreach ($slugs as $slug) { | foreach ($slugs as $slug) { | ||||
$slug->delete(); | $slug->delete(); | ||||
} | } | ||||
$this->saveTransaction(); | $this->saveTransaction(); | ||||
} | } | ||||
/* -( PhabricatorFulltextInterface )--------------------------------------- */ | |||||
public function newFulltextEngine() { | |||||
return new PhabricatorProjectFulltextEngine(); | |||||
} | |||||
} | } |