Differential D20372 Diff 48638 src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/paneltype/PhabricatorDashboardTextPanelType.php
Show All 15 Lines | final class PhabricatorDashboardTextPanelType | ||||
} | } | ||||
public function getPanelTypeDescription() { | public function getPanelTypeDescription() { | ||||
return pht( | return pht( | ||||
'Add a text panel to the dashboard to provide instructions or '. | 'Add a text panel to the dashboard to provide instructions or '. | ||||
'context.'); | 'context.'); | ||||
} | } | ||||
public function getFieldSpecifications() { | protected function newEditEngineFields(PhabricatorDashboardPanel $panel) { | ||||
return array( | return array( | ||||
'text' => array( | id(new PhabricatorRemarkupEditField()) | ||||
'name' => pht('Text'), | ->setKey('text') | ||||
'type' => 'remarkup', | ->setLabel(pht('Text')) | ||||
), | ->setTransactionType( | ||||
PhabricatorDashboardTextPanelTextTransaction::TRANSACTIONTYPE) | |||||
->setValue($panel->getProperty('text', '')), | |||||
); | ); | ||||
} | } | ||||
public function shouldRenderAsync() { | public function shouldRenderAsync() { | ||||
// Rendering text panels is normally a cheap cache hit. | // Rendering text panels is normally a cheap cache hit. | ||||
return false; | return false; | ||||
} | } | ||||
Show All 31 Lines |