Skip to content

Instantly share code, notes, and snippets.

@sebby
Last active April 5, 2019 13:36
Show Gist options
  • Select an option

  • Save sebby/ba119211e19afb48c315c6a8aca8aa93 to your computer and use it in GitHub Desktop.

Select an option

Save sebby/ba119211e19afb48c315c6a8aca8aa93 to your computer and use it in GitHub Desktop.
example for Drupal 8
<?php
$content = array();
$content['container'] = ['#type'=>'fieldset','#title'=>'4ème bloc'];
$header = array('Cell 1', 'Cell 2');
$data = array(
array('A', 'B'),
array('C', 'D'),
array('E', 'F')
);
$content['container'][] = [
'#theme' => 'table',
'#header'=> $header,
'#rows' => $data,
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment