mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Alchemy\Phrasea\PhraseanetService\Provider;
|
|
|
|
use Alchemy\Phrasea\Application as PhraseaApplication;
|
|
use Alchemy\Phrasea\ControllerProvider\ControllerProviderTrait;
|
|
use Alchemy\Phrasea\PhraseanetService\Controller\PSExposeController;
|
|
use Silex\Application;
|
|
use Silex\ControllerProviderInterface;
|
|
use Silex\ServiceProviderInterface;
|
|
|
|
class PSExposeServiceProvider implements ControllerProviderInterface, ServiceProviderInterface
|
|
{
|
|
use ControllerProviderTrait;
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function register(Application $app)
|
|
{
|
|
$app['controller.ps.expose'] = $app->share(function (PhraseaApplication $app) {
|
|
return new PSExposeController($app);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function connect(Application $app)
|
|
{
|
|
$controllers = $this->createAuthenticatedCollection($app);
|
|
|
|
$controllers->match('/create-publication/', 'controller.ps.expose:createPublicationAction')
|
|
->method('POST')
|
|
->bind('ps_expose_create_publication');
|
|
|
|
$controllers->match('/list-publication/', 'controller.ps.expose:listPublicationAction')
|
|
->method('GET')
|
|
->bind('ps_expose_list_publication');
|
|
|
|
return $controllers;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function boot(Application $app)
|
|
{
|
|
|
|
}
|
|
}
|