Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/storage/PhabricatorDashboardPanel.php
| <?php | <?php | ||||
| /** | /** | ||||
| * An individual dashboard panel. | * An individual dashboard panel. | ||||
| */ | */ | ||||
| final class PhabricatorDashboardPanel | final class PhabricatorDashboardPanel | ||||
| extends PhabricatorDashboardDAO | extends PhabricatorDashboardDAO | ||||
| implements | implements | ||||
| PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
| PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
| PhabricatorFlaggableInterface, | PhabricatorFlaggableInterface, | ||||
| PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
| PhabricatorNgramsInterface, | PhabricatorFulltextInterface, | ||||
| PhabricatorFerretInterface, | |||||
| PhabricatorDashboardPanelContainerInterface { | PhabricatorDashboardPanelContainerInterface { | ||||
| protected $name; | protected $name; | ||||
| protected $panelType; | protected $panelType; | ||||
| protected $viewPolicy; | protected $viewPolicy; | ||||
| protected $editPolicy; | protected $editPolicy; | ||||
| protected $authorPHID; | protected $authorPHID; | ||||
| protected $isArchived = 0; | protected $isArchived = 0; | ||||
| ▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | /* -( PhabricatorDestructibleInterface )----------------------------------- */ | ||||
| public function destroyObjectPermanently( | public function destroyObjectPermanently( | ||||
| PhabricatorDestructionEngine $engine) { | PhabricatorDestructionEngine $engine) { | ||||
| $this->openTransaction(); | $this->openTransaction(); | ||||
| $this->delete(); | $this->delete(); | ||||
| $this->saveTransaction(); | $this->saveTransaction(); | ||||
| } | } | ||||
| /* -( PhabricatorDashboardPanelContainerInterface )------------------------ */ | |||||
| /* -( PhabricatorNgramInterface )------------------------------------------ */ | public function getDashboardPanelContainerPanelPHIDs() { | ||||
| return $this->requireImplementation()->getSubpanelPHIDs($this); | |||||
| } | |||||
| /* -( PhabricatorFulltextInterface )--------------------------------------- */ | |||||
| public function newNgrams() { | public function newFulltextEngine() { | ||||
| return array( | return new PhabricatorDashboardPanelFulltextEngine(); | ||||
| id(new PhabricatorDashboardPanelNgrams()) | |||||
| ->setValue($this->getName()), | |||||
| ); | |||||
| } | } | ||||
| /* -( PhabricatorDashboardPanelContainerInterface )------------------------ */ | /* -( PhabricatorFerretInterface )----------------------------------------- */ | ||||
| public function getDashboardPanelContainerPanelPHIDs() { | public function newFerretEngine() { | ||||
| return $this->requireImplementation()->getSubpanelPHIDs($this); | return new PhabricatorDashboardPanelFerretEngine(); | ||||
| } | } | ||||
| } | } | ||||