Differential D20484 Diff 48948 src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
| Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | protected function newEditEngineFields(PhabricatorDashboardPanel $panel) { | ||||
| return array( | return array( | ||||
| $application_field, | $application_field, | ||||
| $query_field, | $query_field, | ||||
| $limit_field, | $limit_field, | ||||
| ); | ); | ||||
| } | } | ||||
| public function initializeFieldsFromRequest( | |||||
| PhabricatorDashboardPanel $panel, | |||||
| PhabricatorCustomFieldList $field_list, | |||||
| AphrontRequest $request) { | |||||
| $map = array(); | |||||
| if (strlen($request->getStr('engine'))) { | |||||
| $map['class'] = $request->getStr('engine'); | |||||
| } | |||||
| if (strlen($request->getStr('query'))) { | |||||
| $map['key'] = $request->getStr('query'); | |||||
| } | |||||
| $full_map = array(); | |||||
| foreach ($map as $key => $value) { | |||||
| $full_map["std:dashboard:core:{$key}"] = $value; | |||||
| } | |||||
| foreach ($field_list->getFields() as $field) { | |||||
| $field_key = $field->getFieldKey(); | |||||
| if (isset($full_map[$field_key])) { | |||||
| $field->setValueFromStorage($full_map[$field_key]); | |||||
| } | |||||
| } | |||||
| } | |||||
| public function renderPanelContent( | public function renderPanelContent( | ||||
| PhabricatorUser $viewer, | PhabricatorUser $viewer, | ||||
| PhabricatorDashboardPanel $panel, | PhabricatorDashboardPanel $panel, | ||||
| PhabricatorDashboardPanelRenderingEngine $engine) { | PhabricatorDashboardPanelRenderingEngine $engine) { | ||||
| $engine = $this->getSearchEngine($panel); | $engine = $this->getSearchEngine($panel); | ||||
| $engine->setViewer($viewer); | $engine->setViewer($viewer); | ||||
| ▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines | |||||