mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
57 lines
1.5 KiB
PHP
57 lines
1.5 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2010 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\Controller\Prod;
|
|
|
|
use Silex\Application,
|
|
Silex\ControllerProviderInterface,
|
|
Silex\ControllerCollection;
|
|
use Symfony\Component\HttpFoundation\Request,
|
|
Symfony\Component\HttpFoundation\Response,
|
|
Symfony\Component\HttpFoundation\RedirectResponse,
|
|
Symfony\Component\HttpKernel\Exception\HttpException,
|
|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|
use Alchemy\Phrasea\RouteProcessor\WorkZone as RouteWorkZone,
|
|
Alchemy\Phrasea\Helper;
|
|
|
|
/**
|
|
*
|
|
* @package
|
|
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
|
* @link www.phraseanet.com
|
|
*/
|
|
class WorkZone implements ControllerProviderInterface
|
|
{
|
|
|
|
public function connect(Application $app)
|
|
{
|
|
$controllers = new ControllerCollection();
|
|
|
|
$controllers->get('/', function(Application $app)
|
|
{
|
|
$twig = new \supertwig();
|
|
|
|
$params = array(
|
|
'WorkZone' => new Helper\WorkZone($app['Core'])
|
|
, 'selected_type' => $app['request']->get('type')
|
|
, 'selected_id' => $app['request']->get('id')
|
|
, 'srt' => $app['request']->get('sort')
|
|
);
|
|
|
|
|
|
return new Response($twig->render('prod/WorkZone/WorkZone.html.twig', $params));
|
|
});
|
|
|
|
return $controllers;
|
|
}
|
|
|
|
}
|