From 758cac97b263bb141ce133a260ec8cd7b07efde9 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Sat, 4 Oct 2014 03:28:30 +1100 Subject: [PATCH] reversed usage of request object/service --- Configuration/ElFinderConfigurationReader.php | 13 ++++++------- Resources/config/elfinder.xml | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Configuration/ElFinderConfigurationReader.php b/Configuration/ElFinderConfigurationReader.php index 3f90fc3..67ce260 100644 --- a/Configuration/ElFinderConfigurationReader.php +++ b/Configuration/ElFinderConfigurationReader.php @@ -4,7 +4,6 @@ use FM\ElfinderBundle\Model\ElFinderConfigurationProviderInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; /** * Class ElFinderConfigurationReader @@ -23,18 +22,18 @@ class ElFinderConfigurationReader implements ElFinderConfigurationProviderInterf protected $parameters; /** - * @var RequestStack + * @var Request */ - protected $requestStack; + protected $request; /** * @param $parameters - * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack + * @param Request $request */ - public function __construct($parameters, RequestStack $requestStack) + public function __construct($parameters, Request $request) { $this->parameters = $parameters; - $this->requestStack = $requestStack; + $this->request = $request; } /** @@ -43,7 +42,7 @@ public function __construct($parameters, RequestStack $requestStack) */ public function getConfiguration($instance) { - $request = $this->requestStack->getCurrentRequest(); + $request = $this->request; $efParameters = $this->parameters; $parameters = $efParameters['instances'][$instance]; $options = array(); diff --git a/Resources/config/elfinder.xml b/Resources/config/elfinder.xml index f07f9e2..37f05c1 100644 --- a/Resources/config/elfinder.xml +++ b/Resources/config/elfinder.xml @@ -9,11 +9,11 @@ - + %fm_elfinder% - + - +