Merge pull request #1370 from jygaulier/SEARCH_ENGINE_SETTINGS

#time 1h
This commit is contained in:
jygaulier
2015-05-05 18:03:21 +02:00

View File

@@ -13,6 +13,7 @@ namespace Alchemy\Phrasea\ControllerProvider\Admin;
use Alchemy\Phrasea\Application as PhraseaApplication; use Alchemy\Phrasea\Application as PhraseaApplication;
use Alchemy\Phrasea\Controller\Admin\SearchEngineController; use Alchemy\Phrasea\Controller\Admin\SearchEngineController;
use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
use Silex\ControllerCollection; use Silex\ControllerCollection;
use Silex\ServiceProviderInterface; use Silex\ServiceProviderInterface;
use Silex\Application; use Silex\Application;
@@ -23,7 +24,9 @@ class SearchEngine implements ControllerProviderInterface, ServiceProviderInterf
public function register(Application $app) public function register(Application $app)
{ {
$app['controller.admin.search-engine'] = $app->share(function (PhraseaApplication $app) { $app['controller.admin.search-engine'] = $app->share(function (PhraseaApplication $app) {
return new SearchEngineController($app); /** @var SearchEngineInterface $searchEngine */
$searchEngine = $app['search_engine'];
return new SearchEngineController($searchEngine->getConfigurationPanel());
}); });
} }