[Drupal] Base hook schema example to put in .install

Introduction Delighted hook_schema is one of those methods where you are happy to have a usable documentation on the api website. It is pretty much self-explanatory and you don’t have to look for hours on third parties websites to get some usable information. 🙂 hook_schema on api.drupal.org and don’t forget to select your Drupal version! […]

[Drupal] Table render array example structure

Result The code

Additional Information Tested to work on Drupal 8.2.x. For some reason, no_striping doesn’t work as expected in 8.2.x (it is ignored). The script which handles the render array conversion to twig ready variables is located here: core\includes\theme.inc. The twig template which renders the table on the default theme is here: core\themes\classy\templates\dataset\table.html.twig.