Adding Custom Blocks to your custom Module

Last updated on
21 September 2016

Contrary to Drupal 7, creating multiple instances of a block to place on your site is the second easiest example of module creation available in Drupal 8.

In this section you will learn how to programmatically add a block to the block layout interface. How to add a (admin) configuration form to the block, and how to process the form. Finally, you will learn how to add and display default configuration values for the form.

Before starting this walk-through, please prepare the module skeleton as per the instructions Prepare a Module skeleton.