mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Add LazyLocator
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace Alchemy\Phrasea\ControllerProvider\Prod;
|
||||
|
||||
use Alchemy\Phrasea\Application as PhraseaApplication;
|
||||
use Alchemy\Phrasea\Controller\LazyLocator;
|
||||
use Alchemy\Phrasea\Controller\Prod\ToolsController;
|
||||
use Alchemy\Phrasea\ControllerProvider\ControllerProviderTrait;
|
||||
use Silex\Application;
|
||||
@@ -27,12 +28,8 @@ class Tools implements ControllerProviderInterface, ServiceProviderInterface
|
||||
$app['controller.prod.tools'] = $app->share(function (PhraseaApplication $app) {
|
||||
return (new ToolsController($app))
|
||||
->setDataboxLoggerLocator($app['phraseanet.logger'])
|
||||
->setFileSystemLocator(function () use ($app) {
|
||||
return $app['filesystem'];
|
||||
})
|
||||
->setSubDefinitionSubstituerLocator(function () use ($app) {
|
||||
return $app['subdef.substituer'];
|
||||
})
|
||||
->setFileSystemLocator(new LazyLocator($app, 'filesystem'))
|
||||
->setSubDefinitionSubstituerLocator(new LazyLocator($app, 'subdef.substituer'))
|
||||
;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user