mirror of
https://github.com/bodyrep/bodyrep-sandpit.git
synced 2026-01-27 15:21:42 +00:00
34 lines
684 B
PHP
34 lines
684 B
PHP
<?php
|
|
|
|
namespace BodyRep\Twig\Extension;
|
|
|
|
use Symfony\Component\HttpKernel\KernelInterface;
|
|
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
|
|
use CG\Core\ClassUtils;
|
|
|
|
class TemplateExtension extends \Twig_Extension
|
|
{
|
|
protected $loader;
|
|
protected $controller;
|
|
|
|
public function __construct(FilesystemLoader $loader)
|
|
{
|
|
$this->loader = $loader;
|
|
}
|
|
|
|
public function setController($controller)
|
|
{
|
|
$this->controller = $controller;
|
|
}
|
|
|
|
/**
|
|
* Returns the name of the extension.
|
|
*
|
|
* @return string The extension name
|
|
*/
|
|
public function getName()
|
|
{
|
|
return 'demo';
|
|
}
|
|
}
|