Differential D21769 Diff 51889 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 188 Lines • ▼ Show 20 Lines | final class PhabricatorDashboardQueryPanelType | ||||
} | } | ||||
private function getSearchEngine(PhabricatorDashboardPanel $panel) { | private function getSearchEngine(PhabricatorDashboardPanel $panel) { | ||||
$class = $panel->getProperty('class'); | $class = $panel->getProperty('class'); | ||||
$engine = PhabricatorApplicationSearchEngine::getEngineByClassName($class); | $engine = PhabricatorApplicationSearchEngine::getEngineByClassName($class); | ||||
if (!$engine) { | if (!$engine) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'The application search engine "%s" is not known to Phabricator!', | 'The application search engine "%s" is unknown.', | ||||
$class)); | $class)); | ||||
} | } | ||||
if (!$engine->canUseInPanelContext()) { | if (!$engine->canUseInPanelContext()) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Application search engines of class "%s" can not be used to build '. | 'Application search engines of class "%s" can not be used to build '. | ||||
'dashboard panels.', | 'dashboard panels.', | ||||
Show All 29 Lines |