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, | ||||
| PhabricatorCustomFieldInterface, | PhabricatorCustomFieldInterface, | ||||
| PhabricatorFlaggableInterface, | PhabricatorFlaggableInterface, | ||||
| PhabricatorProjectInterface, | |||||
| PhabricatorDestructibleInterface { | PhabricatorDestructibleInterface { | ||||
| protected $name; | protected $name; | ||||
| protected $panelType; | protected $panelType; | ||||
| protected $viewPolicy; | protected $viewPolicy; | ||||
| protected $editPolicy; | protected $editPolicy; | ||||
| protected $isArchived = 0; | protected $isArchived = 0; | ||||
| protected $properties = array(); | protected $properties = array(); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | public function setProperty($key, $value) { | ||||
| $this->properties[$key] = $value; | $this->properties[$key] = $value; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getMonogram() { | public function getMonogram() { | ||||
| return 'W'.$this->getID(); | return 'W'.$this->getID(); | ||||
| } | } | ||||
| public function getURI() { | |||||
| return '/'.$this->getMonogram(); | |||||
| } | |||||
| public function getPanelTypes() { | public function getPanelTypes() { | ||||
| $panel_types = PhabricatorDashboardPanelType::getAllPanelTypes(); | $panel_types = PhabricatorDashboardPanelType::getAllPanelTypes(); | ||||
| $panel_types = mpull($panel_types, 'getPanelTypeName', 'getPanelTypeKey'); | $panel_types = mpull($panel_types, 'getPanelTypeName', 'getPanelTypeKey'); | ||||
| asort($panel_types); | asort($panel_types); | ||||
| $panel_types = (array('' => pht('(All Types)')) + $panel_types); | $panel_types = (array('' => pht('(All Types)')) + $panel_types); | ||||
| return $panel_types; | return $panel_types; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines | |||||