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:
46
core/lib/Thelia/Admin/Template/AdminSmartyParser.php
Normal file
46
core/lib/Thelia/Admin/Template/AdminSmartyParser.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Admin\Template;
|
||||
|
||||
use Thelia\Core\Template\SmartyParser;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
// smarty configuration
|
||||
class AdminSmartyParser extends SmartyParser
|
||||
{
|
||||
public function __construct(ContainerInterface $container, $template = false)
|
||||
{
|
||||
$this->template = $template == false ? 'admin/default' : $template;
|
||||
|
||||
parent::__construct($container, $template);
|
||||
}
|
||||
|
||||
public function render($realTemplateName, $parameters) {
|
||||
|
||||
$this->assign($parameters);
|
||||
|
||||
return $this->fetch($realTemplateName);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user