Skip to content

Commit 85e6a54

Browse files
committed
Added more configuration formats
1 parent bc6ffbe commit 85e6a54

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

cookbook/frontend/assetic_php.rst

+35-8
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,41 @@ Combining and Minimizing CSS Files and Compiling SCSS Files
7676

7777
First, configure a new ``scssphp`` Assetic filter as follows:
7878

79-
.. code-block:: yaml
80-
81-
# app/config/config.yml
82-
assetic:
83-
filters:
84-
scssphp:
85-
formatter: "Leafo\\ScssPhp\\Formatter\\Compressed"
86-
# ...
79+
.. configuration-block::
80+
81+
.. code-block:: yaml
82+
83+
# app/config/config.yml
84+
assetic:
85+
filters:
86+
scssphp:
87+
formatter: "Leafo\\ScssPhp\\Formatter\\Compressed"
88+
# ...
89+
90+
.. code-block:: xml
91+
92+
<!-- app/config/config.xml -->
93+
<?xml version="1.0" charset="UTF-8" ?>
94+
<container xmlns="http://symfony.com/schema/dic/services"
95+
xmlns:assetic="http://symfony.com/schema/dic/assetic">
96+
97+
<assetic:config>
98+
<filter name="scssphp" formatter="Leafo\ScssPhp\Formatter\Compressed" />
99+
<!-- ... -->
100+
</assetic:config>
101+
</container>
102+
103+
.. code-block:: php
104+
105+
// app/config/config.php
106+
$container->loadFromExtension('assetic', array(
107+
'filters' => array(
108+
'scssphp' => array(
109+
'formatter' => 'Leafo\ScssPhp\Formatter\Compressed',
110+
),
111+
// ...
112+
),
113+
));
87114

88115
The value of the ``formatter`` option is the fully qualified class name of the
89116
formatter used by the filter to produce the compiled CSS file. Using the

0 commit comments

Comments
 (0)