Skip to content

Instantly share code, notes, and snippets.

@signalpoint
Created April 30, 2018 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save signalpoint/d221c673f13d0c5fe0330fdb3627f286 to your computer and use it in GitHub Desktop.
Save signalpoint/d221c673f13d0c5fe0330fdb3627f286 to your computer and use it in GitHub Desktop.
Drupal 8 Markup Example
<?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