Changement emplacmement templates
This commit is contained in:
@@ -26,7 +26,8 @@
|
||||
"symfony/validator": "2.2.*",
|
||||
"symfony/security": "2.2.*",
|
||||
"symfony/templating": "2.2.*",
|
||||
"noiselabs/smarty-bundle": "dev-master"
|
||||
|
||||
"smarty/smarty": "v3.1.13"
|
||||
},
|
||||
"require-dev" : {
|
||||
"fzaninotto/faker": "dev-master"
|
||||
|
||||
658
composer.lock
generated
658
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,12 @@
|
||||
* @file
|
||||
* Functions needed for Thelia bootstrap
|
||||
*/
|
||||
define('THELIA_ROOT', realpath(__DIR__ .'/../') . "/");
|
||||
define('THELIA_CONF_DIR', THELIA_ROOT . '/local/config');
|
||||
define('THELIA_MODULE_DIR', THELIA_ROOT . '/local/modules');
|
||||
define('THELIA_TEMPLATE_DIR', THELIA_ROOT . 'templates/');
|
||||
define('THELIA_ROOT' , rtrim(realpath(__DIR__ .'/../'),'/') . "/");
|
||||
define('THELIA_LOCAL_DIR' , THELIA_ROOT . '/local/');
|
||||
define('THELIA_CONF_DIR' , THELIA_LOCAL_DIR . 'config/');
|
||||
define('THELIA_MODULE_DIR' , THELIA_LOCAL_DIR . 'modules/');
|
||||
define('THELIA_TEMPLATE_DIR' , THELIA_ROOT . '/web/templates/');
|
||||
|
||||
$loader = require __DIR__ . "/vendor/autoload.php";
|
||||
|
||||
|
||||
|
||||
@@ -56,10 +56,12 @@
|
||||
<call method="setContext">
|
||||
<argument type="service" id="request.context"/>
|
||||
</call>
|
||||
<!--
|
||||
<call method="add">
|
||||
<argument type="service" id="router.default_route"/>
|
||||
<argument>-255</argument>
|
||||
</call>
|
||||
-->
|
||||
<call method="add">
|
||||
<argument type="service" id="router.admin"/>
|
||||
<argument>0</argument>
|
||||
|
||||
@@ -79,19 +79,19 @@ class ViewListener implements EventSubscriberInterface
|
||||
} catch(ResourceNotFoundException $e) {
|
||||
$event->setResponse(new Response($e->getMessage(), 404));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function beforeKernelView(GetResponseForControllerResultEvent $event)
|
||||
{
|
||||
$request = $this->container->get('request');
|
||||
|
||||
|
||||
if (!$view = $request->attributes->get('_view')) {
|
||||
$request->attributes->set('_view', $this->findView($request));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function findView(Request $request)
|
||||
{
|
||||
if (! $view = $request->query->get('view')) {
|
||||
@@ -100,7 +100,7 @@ class ViewListener implements EventSubscriberInterface
|
||||
$view = $request->request->get('view');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class ViewListener implements EventSubscriberInterface
|
||||
KernelEvents::VIEW =>array(
|
||||
array('onKernelView', 0),
|
||||
array('beforeKernelView', 5)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Thelia\Core\Thelia;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user