Differential D13589 Diff 33531 src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php
| Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | public function processRequest(AphrontRequest $request) { | ||||
| return id(new AphrontNullView()) | return id(new AphrontNullView()) | ||||
| ->appendChild( | ->appendChild( | ||||
| array( | array( | ||||
| $form_box, | $form_box, | ||||
| )); | )); | ||||
| } | } | ||||
| private function getAllEditorsWithTags(PhabricatorUser $user) { | private function getAllEditorsWithTags(PhabricatorUser $user) { | ||||
| $editors = id(new PhutilSymbolLoader()) | $editors = id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass('PhabricatorApplicationTransactionEditor') | ->setAncestorClass('PhabricatorApplicationTransactionEditor') | ||||
| ->loadObjects(); | ->setFilterMethod('getMailTagsMap') | ||||
| ->execute(); | |||||
epriestley: This one seems OK. | |||||
| foreach ($editors as $key => $editor) { | foreach ($editors as $key => $editor) { | ||||
| // Remove editors which do not support mail tags. | |||||
| if (!$editor->getMailTagsMap()) { | |||||
| unset($editors[$key]); | |||||
| } | |||||
| // Remove editors for applications which are not installed. | // Remove editors for applications which are not installed. | ||||
| $app = $editor->getEditorApplicationClass(); | $app = $editor->getEditorApplicationClass(); | ||||
| if ($app !== null) { | if ($app !== null) { | ||||
| if (!PhabricatorApplication::isClassInstalledForViewer($app, $user)) { | if (!PhabricatorApplication::isClassInstalledForViewer($app, $user)) { | ||||
| unset($editors[$key]); | unset($editors[$key]); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||
This one seems OK.