PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 456 bytes
 

Contents

Class file image Download
--TEST-- "template_from_string" function --TEMPLATE-- {% include template_from_string(template) %} {% include template_from_string("Hello {{ name }}") %} {% include template_from_string('{% extends "parent.twig" %}{% block content %}Hello {{ name }}{% endblock %}') %} --TEMPLATE(parent.twig)-- {% block content %}{% endblock %} --DATA-- return array('name' => 'Fabien', 'template' => "Hello {{ name }}") --EXPECT-- Hello Fabien Hello Fabien Hello Fabien