Created
April 30, 2018 14:01
-
-
Save signalpoint/d221c673f13d0c5fe0330fdb3627f286 to your computer and use it in GitHub Desktop.
Drupal 8 Markup Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// In Drupal 8, it seems our good friend #markup has a new friend instead: | |
$markupElement = [ | |
'#type' => 'inline_template', | |
'#template' => '<p>{{msg}}</p>', | |
'#context' => [ | |
'msg' => 'Hello world' | |
] | |
]; | |
return $markupElement; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment