parser
This commit is contained in:
@@ -69,11 +69,9 @@ class TheliaBundle extends Bundle
|
||||
|
||||
$container->register('resolver', 'Symfony\Component\HttpKernel\Controller\ControllerResolver');
|
||||
|
||||
$container->register('tpex', 'Thelia\Tpex\Tpex');
|
||||
|
||||
$container->register('parser','Thelia\Core\Template\Parser')
|
||||
->addArgument(new Reference('service_container'))
|
||||
->addArgument(new Reference('tpex'))
|
||||
;
|
||||
/**
|
||||
* RouterListener implements EventSubscriberInterface and listen for kernel.request event
|
||||
|
||||
@@ -75,10 +75,9 @@ class Parser implements ParserInterface
|
||||
*
|
||||
* public function __construct(ContainerBuilder $container)
|
||||
*/
|
||||
public function __construct(ContainerInterface $container, Tpex $tpex)
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
$this->tpex = $tpex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,16 +147,18 @@ class Parser implements ParserInterface
|
||||
public function loadParser()
|
||||
{
|
||||
$content = $this->openFile($this->getRequest());
|
||||
|
||||
$this->tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
||||
$this->tpex->configure(
|
||||
|
||||
$tpex = new Tpex();
|
||||
|
||||
$tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
||||
$tpex->configure(
|
||||
array(),
|
||||
array(),
|
||||
array(
|
||||
"secure" => "Thelia\Core\Template\BaseParam\Secure"
|
||||
)
|
||||
);
|
||||
$this->setContent($this->tpex->execute());
|
||||
$this->setContent($tpex->execute());
|
||||
}
|
||||
|
||||
protected function openFile(Request $request)
|
||||
|
||||
Submodule core/lib/Thelia/Tpex updated: 3830a56197...b591fc524d
Reference in New Issue
Block a user