Differential D10585 Diff 25583 src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutConfig.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/layoutconfig/PhabricatorDashboardLayoutConfig.php
| Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | public function getColumnSelectOptions() { | ||||
| $options = array(); | $options = array(); | ||||
| switch ($this->getLayoutMode()) { | switch ($this->getLayoutMode()) { | ||||
| case self::MODE_HALF_AND_HALF: | case self::MODE_HALF_AND_HALF: | ||||
| case self::MODE_THIRD_AND_THIRDS: | case self::MODE_THIRD_AND_THIRDS: | ||||
| case self::MODE_THIRDS_AND_THIRD: | case self::MODE_THIRDS_AND_THIRD: | ||||
| return array( | return array( | ||||
| 0 => pht('Left'), | 0 => pht('Left'), | ||||
| 1 => pht('Right')); | 1 => pht('Right'), | ||||
| ); | |||||
| break; | break; | ||||
| case self::MODE_FULL: | case self::MODE_FULL: | ||||
| throw new Exception('There is only one column in mode full.'); | throw new Exception('There is only one column in mode full.'); | ||||
| break; | break; | ||||
| default: | default: | ||||
| throw new Exception('Unknown layout mode!'); | throw new Exception('Unknown layout mode!'); | ||||
| break; | break; | ||||
| } | } | ||||
| Show All 19 Lines | $layout_config->setPanelLocations(idx( | ||||
| $layout_config->getDefaultPanelLocations())); | $layout_config->getDefaultPanelLocations())); | ||||
| return $layout_config; | return $layout_config; | ||||
| } | } | ||||
| public function toDictionary() { | public function toDictionary() { | ||||
| return array( | return array( | ||||
| 'layoutMode' => $this->getLayoutMode(), | 'layoutMode' => $this->getLayoutMode(), | ||||
| 'panelLocations' => $this->getPanelLocations() | 'panelLocations' => $this->getPanelLocations(), | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||