mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-29 04:21:06 +00:00
Move Import configuration to Core
This commit is contained in:
parent
8b13631e3d
commit
6552c84eec
5 changed files with 7 additions and 17 deletions
|
@ -162,7 +162,5 @@ wallabag_core:
|
|||
- 'Montserrat'
|
||||
- 'OpenDyslexicRegular'
|
||||
- 'Oswald'
|
||||
|
||||
wallabag_import:
|
||||
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv', 'text/html']
|
||||
resource_dir: "%kernel.project_dir%/web/uploads/import"
|
||||
|
|
|
@ -75,6 +75,11 @@ class Configuration implements ConfigurationInterface
|
|||
->arrayNode('fonts')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->arrayNode('allow_mimetypes')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->scalarNode('resource_dir')
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ class WallabagCoreExtension extends Extension
|
|||
$container->setParameter('wallabag_core.site_credentials.encryption_key_path', $config['encryption_key_path']);
|
||||
$container->setParameter('wallabag_core.default_ignore_origin_instance_rules', $config['default_ignore_origin_instance_rules']);
|
||||
$container->setParameter('wallabag_core.fonts', $config['fonts']);
|
||||
$container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']);
|
||||
$container->setParameter('wallabag_import.resource_dir', $config['resource_dir']);
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
|
@ -10,17 +10,6 @@ class Configuration implements ConfigurationInterface
|
|||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('wallabag_import');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
|
||||
$rootNode
|
||||
->children()
|
||||
->arrayNode('allow_mimetypes')
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->scalarNode('resource_dir')
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
|
|
@ -9,10 +9,6 @@ class WallabagImportExtension extends Extension
|
|||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
$container->setParameter('wallabag_import.allow_mimetypes', $config['allow_mimetypes']);
|
||||
$container->setParameter('wallabag_import.resource_dir', $config['resource_dir']);
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
Loading…
Reference in a new issue