/**
  * @param ContainerBuilder $container
  */
 public function __construct(ContainerBuilder $container)
 {
     $this->container = $container;
     // Keep it static to prevent to many objects
     if (!self::$configTree) {
         $configTree = new TreeBuilder();
         $node = $configTree->root('user');
         $configuration = new Configuration();
         $configuration->addUserSysConfig($node);
         self::$configTree = $configTree;
     }
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function getConfigTreeBuilder()
 {
     $treeBuilder = new TreeBuilder();
     $rootNode = $treeBuilder->root('viettut_user_system_lecturer');
     $configuration = new UserConfiguration();
     // Add the UserConfiguration tree
     // Enables everything except group
     $configuration->addUserConfig($rootNode, UserConfiguration::CONFIG_ALL ^ UserConfiguration::CONFIG_SECTION_GROUP);
     // Here you should define the parameters that are allowed to
     // configure your bundle. See the documentation linked above for
     // more information on that topic.
     return $treeBuilder;
 }