Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 212cded

Browse files
committed
Merge pull request #37 from WouterJ/fix_xml_config
Added XML support
2 parents 51ecf00 + bd03aa3 commit 212cded

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

DependencyInjection/CmfTreeBrowserExtension.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,19 @@ public function load(array $configs, ContainerBuilder $container)
3636

3737
$loader->load('tree.xml');
3838
}
39+
40+
/**
41+
* Returns the base path for the XSD files.
42+
*
43+
* @return string The XSD base path
44+
*/
45+
public function getXsdValidationBasePath()
46+
{
47+
return __DIR__.'/../Resources/config/schema';
48+
}
49+
50+
public function getNamespace()
51+
{
52+
return 'http://cmf.symfony.com/schema/dic/treebrowser';
53+
}
3954
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<xsd:schema xmlns="http://cmf.symfony.com/schema/dic/treebrowser"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
targetNamespace="http://cmf.symfony.com/schema/dic/treebrowser"
6+
elementFormDefault="qualified">
7+
8+
<xsd:element name="config" type="config" />
9+
10+
<xsd:complexType name="config">
11+
<xsd:attribute name="session-name" type="xsd:string" />
12+
</xsd:complexType>
13+
</xsd:schema>

0 commit comments

Comments
 (0)