Differential D20372 Diff 48638 src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/editor/PhabricatorDashboardPanelEditEngine.php
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | final class PhabricatorDashboardPanelEditEngine | ||||
} | } | ||||
public function getEffectiveObjectEditDoneURI($object) { | public function getEffectiveObjectEditDoneURI($object) { | ||||
$dashboard = $this->getDashboard(); | $dashboard = $this->getDashboard(); | ||||
if ($dashboard) { | if ($dashboard) { | ||||
return $dashboard->getURI(); | return $dashboard->getURI(); | ||||
} | } | ||||
return parent::getEffectiveObjectDoneURI($object); | return parent::getEffectiveObjectEditDoneURI($object); | ||||
} | } | ||||
protected function getObjectEditTitleText($object) { | protected function getObjectEditTitleText($object) { | ||||
return pht('Edit Panel: %s', $object->getName()); | return pht('Edit Panel: %s', $object->getName()); | ||||
} | } | ||||
protected function getObjectEditShortText($object) { | protected function getObjectEditShortText($object) { | ||||
return pht('Edit Panel'); | return pht('Edit Panel'); | ||||
Show All 23 Lines | if ($dashboard) { | ||||
PhabricatorContentSource::newFromRequest($request), | PhabricatorContentSource::newFromRequest($request), | ||||
$object, | $object, | ||||
$dashboard, | $dashboard, | ||||
(int)$this->getColumnID()); | (int)$this->getColumnID()); | ||||
} | } | ||||
} | } | ||||
protected function buildCustomEditFields($object) { | protected function buildCustomEditFields($object) { | ||||
return array( | $fields = array( | ||||
id(new PhabricatorTextEditField()) | id(new PhabricatorTextEditField()) | ||||
->setKey('name') | ->setKey('name') | ||||
->setLabel(pht('Name')) | ->setLabel(pht('Name')) | ||||
->setDescription(pht('Name of the panel.')) | ->setDescription(pht('Name of the panel.')) | ||||
->setConduitDescription(pht('Rename the panel.')) | ->setConduitDescription(pht('Rename the panel.')) | ||||
->setConduitTypeDescription(pht('New panel name.')) | ->setConduitTypeDescription(pht('New panel name.')) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorDashboardPanelNameTransaction::TRANSACTIONTYPE) | PhabricatorDashboardPanelNameTransaction::TRANSACTIONTYPE) | ||||
->setIsRequired(true) | ->setIsRequired(true) | ||||
->setValue($object->getName()), | ->setValue($object->getName()), | ||||
); | ); | ||||
$panel_fields = $object->getEditEngineFields(); | |||||
foreach ($panel_fields as $panel_field) { | |||||
$fields[] = $panel_field; | |||||
} | |||||
return $fields; | |||||
} | } | ||||
} | } |