From 0ea672e9068f02b74802b4c678f90baece953291 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 26 Sep 2014 03:53:55 +1100 Subject: [PATCH] added ability to disable certain commands --- Configuration/ElFinderConfigurationReader.php | 2 ++ DependencyInjection/Configuration.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Configuration/ElFinderConfigurationReader.php b/Configuration/ElFinderConfigurationReader.php index 48b1bb7..3f90fc3 100644 --- a/Configuration/ElFinderConfigurationReader.php +++ b/Configuration/ElFinderConfigurationReader.php @@ -54,9 +54,11 @@ public function getConfiguration($instance) $path = $parameter['path']; $driver = isset($parameter['driver']) ? $parameter['driver'] : null; + $driverOptions = array( 'driver' => $parameter['driver'], 'service' => $driver, + 'disabled' => $parameter['disabled'], 'path' => $path . '/', 'URL' => isset($parameter['url']) && $parameter['url'] ? strpos($parameter['url'], 'http') === 0 diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index dec4fe4..51df1b5 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -55,6 +55,10 @@ public function getConfigTreeBuilder() ->thenInvalid('Invalid filesystem driver "%s"') ->end() ->defaultValue('LocalFileSystem')->end() + ->arrayNode('disabled') + ->prototype('scalar')->end() + ->defaultValue(array()) + ->end() ->scalarNode('path')->defaultValue('')->end() ->scalarNode('url')->end() ->booleanNode('showhidden')->defaultFalse()->end()