Integration of Assetic in SmartyParser, extended it to Admin (we can now

use loops !), added the Thelia ControllerResolver and fixed config and
routing accordingly.²:wq
This commit is contained in:
franck
2013-06-19 02:07:43 +02:00
parent 7351edeb46
commit 89abfaad48
35 changed files with 763 additions and 244 deletions

View File

@@ -18,6 +18,7 @@
</commands>
<services>
<service id="event_dispatcher" class="Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher">
<argument type="service" id="service_container" />
</service>
@@ -26,9 +27,23 @@
<tag name="kernel.event_subscriber"/>
</service>
<service id="controller_resolver" class="Symfony\Component\HttpKernel\Controller\ControllerResolver"/>
<!--
A ControllerResolver that supports "a:b:c", "service:method" and class::method" notations,
thus allowing the definition of controllers as service (see http://symfony.com/fr/doc/current/cookbook/controller/service.html)
We use it here to inject the servi ce container in the admin base controller.
-->
<service id="controller_resolver" class="Thelia\Core\Controller\ControllerResolver">
<argument type="service" id="service_container"/>
</service>
<service id="parser" class="Thelia\Core\Template\SmartyParser">
<service id="thelia.parser" class="Thelia\Core\Template\SmartyParser">
<argument type="service" id="service_container"/>
<call method="setLoopList">
<argument>%tpex.loop%</argument>
</call>
</service>
<service id="thelia.admin.parser" class="Thelia\Admin\Template\AdminSmartyParser">
<argument type="service" id="service_container"/>
<call method="setLoopList">
<argument>%tpex.loop%</argument>

View File

@@ -20,6 +20,10 @@
<service id="controller.default" class="Thelia\Controller\DefaultController"/>
<service id="thelia.admin.base_controller" class="Thelia\Admin\Controller\BaseAdminController">
<argument type="service" id="service_container"/>
</service>
<service id="matcher.default" class="Thelia\Routing\Matcher\DefaultMatcher">
<argument type="service" id="controller.default"/>
</service>

View File

@@ -5,6 +5,6 @@
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="admin" path="/admin">
<default key="_controller">\Thelia\Admin\Controller\BaseAdminController::indexAction</default>
<default key="_controller">Thelia\Admin\Controller\BaseAdminController::indexAction</default>
</route>
</routes>