diff --git a/flextype/bootstrap.php b/flextype/bootstrap.php index 6b90b95b..c7866b23 100755 --- a/flextype/bootstrap.php +++ b/flextype/bootstrap.php @@ -314,10 +314,17 @@ $app->get('/image/{path:.+}', function (Request $request, Response $response, ar return $flextype['images']->getImageResponse($args['path'], $_GET); }); +/** + * Add plugins service to Flextype container + */ +$flextype['plugins'] = function($container) use ($flextype, $app) { + return new Plugins($flextype, $app); +}; + /** * Init plugins */ -$plugins = new Plugins($flextype, $app); +$flextype['plugins']->init($flextype, $app); /** * Run application