Differential D20414 Diff 48757 src/applications/dashboard/layoutconfig/PhabricatorDashboardPanelRefList.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/layoutconfig/PhabricatorDashboardPanelRefList.php
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | public function getPanelRef($panel_key) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| public function toDictionary() { | public function toDictionary() { | ||||
| return array_values(mpull($this->getPanelRefs(), 'toDictionary')); | return array_values(mpull($this->getPanelRefs(), 'toDictionary')); | ||||
| } | } | ||||
| public function newPanelRef(PhabricatorDashboardPanel $panel, $column_key) { | public function newPanelRef( | ||||
| PhabricatorDashboardPanel $panel, | |||||
| $column_key = null) { | |||||
| if ($column_key === null) { | |||||
| $column_key = head_key($this->columns); | |||||
| } | |||||
| $ref = id(new PhabricatorDashboardPanelRef()) | $ref = id(new PhabricatorDashboardPanelRef()) | ||||
| ->setPanelKey($this->newPanelKey()) | ->setPanelKey($this->newPanelKey()) | ||||
| ->setPanelPHID($panel->getPHID()) | ->setPanelPHID($panel->getPHID()) | ||||
| ->setColumnKey($column_key); | ->setColumnKey($column_key); | ||||
| $this->refs[] = $ref; | $this->refs[] = $ref; | ||||
| return $ref; | return $ref; | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||