Undefined content in twig extension