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

Articles

30/09/2019, by mikhail
Drupal configs

Configuration in Drupal is the basis for all settings of content types, fields, configuration forms and variables. With the help of configuration we can transfer changes from one site to another, develop different features at the same time and without interfering with each other.

Configurations can be uploaded to YML files and added to the Git repository, so you can commit your changes in site settings and transfer the changes to Dev or Live. The idea of configuration in Drupal is similar to how the Features module works:

Drupal configs
30/09/2019, by mikhail
Miltistep popup form in Drupal

In this article we will continue to understand Form API in Drupal 8 and make a multistep form. We have already created the usual configuration form for the module, the multistep form is created in a similar way using $form_state to store data between the form steps.

Examples of code can be found at github:

https://github.com/levmyshkin/drupalbook8

For a multistep form you need to add a form class:

/modules/custom/drupalbook/src/Form/MultiStepForm.php

Miltistep popup form in Drupal
27/09/2019, by mikhail
hook_form_alter

In one of the previous lessons we have learned what hooks are, in this lesson we will work with hook_form_alter() hooks in practice and add functionality to the existing form.

Examples of code can be found at github:
https://github.com/levmyshkin/drupalbook8

In this lesson we will start to look at hooks in practice, later on we will return to hooks and look at a couple of other examples. For now, let's start with hook_form_alter().

hook_form_alter
27/09/2019, by mikhail
Working with forms in Drupal 8

In this tutorial, we will deal with the Drupal Form API and create a settings form for the module. We have already created modules for displaying the page and block, let's now create a configuration form in which we will store data for connecting to a conditional service. Let's say that we need to store the API Key and the API Client ID on the site, for example, for the Google Maps API.

Code examples can be viewed on github:
https://github.com/levmyshkin/drupalbook8

Working with forms in Drupal 8
26/09/2019, by mikhail
Plugins

In this tutorial, we will look at how to output blocks programmatically through a custom module in Drupal 8.

Code examples can be viewed on github:
https://github.com/levmyshkin/drupalbook8

Let's start by adding a file containing a PHP class, this is how blocks are created in Drupal through a custom module. The process of creating the file is the same as the class for the page, as we did here:

Plugins
25/09/2019, by mikhail
Route

We can use the parameters in the URL for routes. They work just like contextual filters in Views. We can for example pass in the URL the ID of various entities, text strings or sequential ID separated by comma or pluses. In this lesson, we will pass the ID of the node and display the title and body of this node in the content.

Code examples can be viewed on github:
https://github.com/levmyshkin/drupalbook8

Let's add route to our drupalbook.routing.yml module file:

Route
25/09/2019, by mikhail
documentation

As you learn the Drupal API, you will often need to refer to the main documentation at https://api.drupal.org. This is the automatically generated Drupal documentation. It contains all the information about each function, class, method, where they are defined, where a brief description is used. Also on this site there is API help, I advise you to familiarize yourself with each of the sections:

documentation
24/09/2019, by mikhail
Drupal module

Let's start creating our module with a little ordering. Let's continue to separate custom and contributed modules. In Drupal modules are in the / modules folder. Now we do not need to put them deep into /sites/all/modules, although readme says that this should work, use the /modules folder after all. Inside the /modules folder, we will create two custom and contrib folders. The contrib folder will store additional modules from drupal.org, and our custom modules will be stored in the custom folder.

English subtitles:

Drupal module