Exemplo n.º 1
0
 public function getMainConfigTree(array $factories)
 {
     $tb = new TreeBuilder();
     $rootNode = $tb->root('security:config', 'array');
     $rootNode->scalarNode('access_denied_url')->end()->scalarNode('session_fixation_strategy')->cannotBeEmpty()->defaultValue('migrate')->end();
     $this->addEncodersSection($rootNode);
     $this->addProvidersSection($rootNode);
     $this->addFirewallsSection($rootNode, $factories);
     $this->addAccessControlSection($rootNode);
     $this->addRoleHierarchySection($rootNode);
     return $tb->buildTree();
 }
Exemplo n.º 2
0
 /**
  * Generates the configuration tree.
  *
  * @param boolean $kernelDebug The kernel.debug DIC parameter
  * @return \Symfony\Component\DependencyInjection\Configuration\NodeInterface
  */
 public function getConfigTree($kernelDebug)
 {
     $treeBuilder = new TreeBuilder();
     $rootNode = $treeBuilder->root('app:config', 'array');
     $rootNode->scalarNode('cache_warmer')->defaultValue(!$kernelDebug)->end()->scalarNode('charset')->end()->scalarNode('document_root')->end()->scalarNode('error_handler')->end()->scalarNode('exception_controller')->end()->scalarNode('ide')->end()->booleanNode('test')->end();
     $this->addCsrfProtectionSection($rootNode);
     $this->addEsiSection($rootNode);
     $this->addProfilerSection($rootNode);
     $this->addRouterSection($rootNode);
     $this->addSessionSection($rootNode);
     $this->addTemplatingSection($rootNode);
     $this->addTranslatorSection($rootNode);
     $this->addValidationSection($rootNode);
     return $treeBuilder->buildTree();
 }