Add Form for ElasticSearch Configuration.

Also changed type from array to Options object.
This commit is contained in:
Benoît Burnichon
2015-06-29 15:04:50 +02:00
parent 7271e28cf5
commit 28fee99fc4
20 changed files with 306 additions and 332 deletions

View File

@@ -24,9 +24,7 @@ class SearchEngine implements ControllerProviderInterface, ServiceProviderInterf
public function register(Application $app)
{
$app['controller.admin.search-engine'] = $app->share(function (PhraseaApplication $app) {
/** @var SearchEngineInterface $searchEngine */
$searchEngine = $app['search_engine'];
return new SearchEngineController($searchEngine->getConfigurationPanel());
return new SearchEngineController($app);
});
}
@@ -39,11 +37,9 @@ class SearchEngine implements ControllerProviderInterface, ServiceProviderInterf
/** @var ControllerCollection $controllers */
$controllers = $app['controllers_factory'];
$controllers->get('/', 'controller.admin.search-engine:getConfigurationPanelAction')
->bind('admin_searchengine_get');
$controllers->post('/', 'controller.admin.search-engine:postConfigurationPanelAction')
->bind('admin_searchengine_post');
$controllers->match('/', 'controller.admin.search-engine:formConfigurationPanelAction')
->method('GET|POST')
->bind('admin_searchengine_form');
return $controllers;
}