public function ThemeTestController::testInlineTemplate in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::testInlineTemplate()
Tests the inline template functionality.
Return value
array A render array containing an inline template.
1 string reference to 'ThemeTestController::testInlineTemplate'
- theme_test.routing.yml in core/
modules/ system/ tests/ modules/ theme_test/ theme_test.routing.yml - core/modules/system/tests/modules/theme_test/theme_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ theme_test/ src/ ThemeTestController.php, line 62 - Contains \Drupal\theme_test\ThemeTestController.
Class
- ThemeTestController
- Controller routines for theme test routes.
Namespace
Drupal\theme_testCode
public function testInlineTemplate() {
$element = array();
$element['test'] = array(
'#type' => 'inline_template',
'#template' => 'test-with-context {{ llama }}',
'#context' => array(
'llama' => 'muuh',
),
);
return $element;
}