[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 public function controllerCallbackExample() { return [ ‘#type’ => ‘table’, ‘#caption’ => ‘This is a caption. Use a translated string here.’, ‘#header’ => [ ‘Header 1’, ‘Header 2’, ‘Header 3’, ‘Header 4’ ], ‘#rows’ => [ [ ‘Row 1 Cell 1’, ‘Row 1 Cell 2’, ‘Row 1 Cell 3’, [‘data’ => ‘Row 1 …