mirror of
https://github.com/bodyrep/bodyrep-sandpit.git
synced 2026-01-29 16:21:39 +00:00
Django import
Django import
This commit is contained in:
33
symfony/src/BodyRep/Twig/Extension/TemplateExtension.php
Normal file
33
symfony/src/BodyRep/Twig/Extension/TemplateExtension.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user