share(function (PhraseaApplication $app) { return (new ToolsController($app)) ->setDataboxLoggerLocator($app['phraseanet.logger']) ->setDispatcher($app['dispatcher']) ->setFileSystemLocator(new LazyLocator($app, 'filesystem')) ->setSubDefinitionSubstituerLocator(new LazyLocator($app, 'subdef.substituer')) ; }); } public function boot(Application $app) { // no-op } public function connect(Application $app) { $controllers = $this->createAuthenticatedCollection($app); $firewall = $this->getFirewall($app); $controllers->before(function () use ($firewall) { $firewall->requireRight(\ACL::IMGTOOLS); }); $controllers->get('/', 'controller.prod.tools:indexAction'); $controllers->post('/rotate/', 'controller.prod.tools:rotateAction') ->bind('prod_tools_rotate'); $controllers->post('/image/', 'controller.prod.tools:imageAction') ->bind('prod_tools_image'); /** @uses \Alchemy\Phrasea\Controller\Prod\ToolsController::hddocAction */ $controllers->post('/hddoc/', 'controller.prod.tools:hddocAction') ->bind('prod_tools_hd_substitution'); /** @uses \Alchemy\Phrasea\Controller\Prod\ToolsController::changeThumbnailAction */ $controllers->post('/chgthumb/', 'controller.prod.tools:changeThumbnailAction') ->bind('prod_tools_thumbnail_substitution'); $controllers->post('/thumb-extractor/confirm-box/', 'controller.prod.tools:submitConfirmBoxAction'); $controllers->post('/thumb-extractor/apply/', 'controller.prod.tools:applyThumbnailExtractionAction'); $controllers->post('/sharing-editor/{base_id}/{record_id}/', 'controller.prod.tools:editRecordSharing'); $controllers->post('/metadata/save/', 'controller.prod.tools:saveMetasAction') ->bind('prod_tools_metadata_save'); $controllers->post('/auto-subtitle/', 'controller.prod.tools:autoSubtitleAction') ->bind('prod_tools_auto_subtitle'); $controllers->get('/videoEditor', 'controller.prod.tools:videoEditorAction'); return $controllers; } }