You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.2 KiB
65 lines
2.2 KiB
<?php |
|
|
|
/* |
|
* This file is part of the ShadowareMatomoBundle package. |
|
* |
|
* (c) Ulrich VANDENHEKKE <ulrich.vdh@shadoware.org> |
|
* |
|
* For the full copyright and license information, please view the LICENSE |
|
* file that was distributed with this source code. |
|
*/ |
|
|
|
namespace Shadoware\MatomoBundle\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/extension.html#cookbook-bundles-extension-config-class} |
|
*/ |
|
class Configuration implements ConfigurationInterface |
|
{ |
|
/** |
|
* {@inheritDoc} |
|
*/ |
|
public function getConfigTreeBuilder() |
|
{ |
|
$treeBuilder = new TreeBuilder(); |
|
$rootNode = $treeBuilder->root('shadoware_matomo'); |
|
|
|
$rootNode->children() |
|
->scalarNode('base_url')->isRequired()->end() |
|
->scalarNode('token_id')->defaultNull()->end() |
|
->arrayNode('analytics')->canBeEnabled() |
|
->children() |
|
->scalarNode('id_site')->end() |
|
->scalarNode('hide_matomo')->defaultFalse()->end() |
|
->arrayNode('heartbeat') |
|
->children() |
|
->scalarNode('enabled')->defaultFalse()->end() |
|
->scalarNode('minimum_visit_length')->defaultValue(15)->end() |
|
->scalarNode('delay')->defaultValue(30)->end() |
|
->end() |
|
->end() |
|
->end() |
|
->end() |
|
->arrayNode('tag_management')->canBeEnabled() |
|
->children() |
|
->scalarNode('id_container')->end() |
|
->arrayNode('variables') |
|
->arrayPrototype() |
|
->children() |
|
->scalarNode('key')->end() |
|
->scalarNode('value')->end() |
|
->end() |
|
->end() |
|
->end() |
|
->end() |
|
->end() |
|
->end(); |
|
|
|
return $treeBuilder; |
|
} |
|
}
|
|
|