mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2015 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\ControllerProvider\Admin;
|
|
|
|
use Alchemy\Phrasea\Application as PhraseaApplication;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Silex\Application;
|
|
use Silex\ControllerProviderInterface;
|
|
|
|
class SearchEngine implements ControllerProviderInterface
|
|
{
|
|
public function connect(Application $app)
|
|
{
|
|
$app['controller.admin.search-engine'] = $this;
|
|
|
|
$controllers = $app['controllers_factory'];
|
|
|
|
$controllers->get('/', 'controller.admin.search-engine:getSearchEngineConfigurationPanel')
|
|
->bind('admin_searchengine_get');
|
|
|
|
$controllers->post('/', 'controller.admin.search-engine:postSearchEngineConfigurationPanel')
|
|
->bind('admin_searchengine_post');
|
|
|
|
return $controllers;
|
|
}
|
|
|
|
public function getSearchEngineConfigurationPanel(PhraseaApplication $app, Request $request)
|
|
{
|
|
return $app['phraseanet.SE']->getConfigurationPanel()->get($app, $request);
|
|
}
|
|
|
|
public function postSearchEngineConfigurationPanel(PhraseaApplication $app, Request $request)
|
|
{
|
|
return $app['phraseanet.SE']->getConfigurationPanel()->post($app, $request);
|
|
}
|
|
}
|