Differential D20406 Diff 48713 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 101 Lines • ▼ Show 20 Lines | switch ($this->getLayoutMode()) { | ||||
break; | break; | ||||
} | } | ||||
if ($grippable) { | if ($grippable) { | ||||
$class .= ' grippable'; | $class .= ' grippable'; | ||||
} | } | ||||
return $class; | return $class; | ||||
} | } | ||||
public static function getLayoutModeSelectOptions() { | |||||
return array( | |||||
self::MODE_FULL => pht('One full-width column'), | |||||
self::MODE_HALF_AND_HALF => pht('Two columns, 1/2 and 1/2'), | |||||
self::MODE_THIRD_AND_THIRDS => pht('Two columns, 1/3 and 2/3'), | |||||
self::MODE_THIRDS_AND_THIRD => pht('Two columns, 2/3 and 1/3'), | |||||
); | |||||
} | |||||
public static function newFromDictionary(array $dict) { | public static function newFromDictionary(array $dict) { | ||||
$layout_config = id(new PhabricatorDashboardLayoutConfig()) | $layout_config = id(new PhabricatorDashboardLayoutConfig()) | ||||
->setLayoutMode(idx($dict, 'layoutMode', self::MODE_FULL)); | ->setLayoutMode(idx($dict, 'layoutMode', self::MODE_FULL)); | ||||
$layout_config->setPanelLocations(idx( | $layout_config->setPanelLocations(idx( | ||||
$dict, | $dict, | ||||
'panelLocations', | 'panelLocations', | ||||
$layout_config->getDefaultPanelLocations())); | $layout_config->getDefaultPanelLocations())); | ||||
Show All 11 Lines |