Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll
13/04/2025, by Ivan

Menu

To use block instance configuration, we can modify the build() method of the HelloBlock class:

/**
 * {@inheritdoc}
 */  
public function build() {
  $config = $this->getConfiguration();

  if (!empty($config['hello_block_name'])) {
    $name = $config['hello_block_name'];
  }
  else {
    $name = $this->t('to no one');
  }

  return [
    '#markup' => $this->t('Hello @name!', [
      '@name' => $name,
    ]),
  ];
}

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.