Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
5 / 5 |
| TemplateExtension | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
5 / 5 |
| __construct(FilesystemLoader $loader) | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| setController($controller) | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| getName() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?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'; | |
| } | |
| } |