forked from Emmedy/h5p-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Configuration.php
53 lines (47 loc) · 2.56 KB
/
Configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace Emmedy\H5PBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files.
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
*/
class Configuration implements ConfigurationInterface
{
const H5P_VERSION = '0.1'; // version of Symfony H5P bundle
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('emmedy_h5p');
$rootNode
->children()
->scalarNode('storage_dir')->defaultValue("h5p")->end()
->scalarNode('web_dir')->defaultValue("web")->end()
->booleanNode('hub_is_enabled')->defaultTrue()->end()
->booleanNode('send_usage_statistics')->defaultTrue()->end()
->booleanNode('save_content_state')->defaultFalse()->end()
->integerNode('save_content_fequency')->defaultValue(30)->end()
->booleanNode('hub_is_enabled')->defaultTrue()->end()
->scalarNode('whitelist')->defaultValue(\H5PCore::$defaultContentWhitelist)->end()
->scalarNode('library_whitelist_extras')->defaultValue(\H5PCore::$defaultLibraryWhitelistExtras)->end()
->booleanNode('dev_mode')->defaultFalse()->end()
->booleanNode('first_runnable_saved')->defaultFalse()->end()
->scalarNode('site_type')->defaultValue('local')->end()
->scalarNode('site_uuid')->defaultValue('')->end()
->booleanNode('send_usage_statistics')->defaultTrue()->end()
->booleanNode(\H5PCore::DISPLAY_OPTION_ABOUT)->defaultTrue()->end()
->booleanNode(\H5PCore::DISPLAY_OPTION_FRAME)->defaultTrue()->end()
->integerNode(\H5PCore::DISPLAY_OPTION_DOWNLOAD)->defaultValue(\H5PDisplayOptionBehaviour::NEVER_SHOW)->end()
->integerNode(\H5PCore::DISPLAY_OPTION_EMBED)->defaultValue(\H5PDisplayOptionBehaviour::NEVER_SHOW)->end()
->booleanNode(\H5PCore::DISPLAY_OPTION_COPYRIGHT)->defaultTrue()->end()
->integerNode('content_type_cache_updated_at')->defaultValue(0)->end()
->booleanNode('enable_lrs_content_types')->defaultFalse()->end()
->booleanNode('use_permission')->defaultFalse()->end()
->end();
return $treeBuilder;
}
}