Articles

In previous articles, we discussed what Services, Dependency Injection (DI) are and how to use them in your controller, block and form:
9.15. Services and Dependency Injection.
9.15.1. Dependency Injection in Controller
9.15.2. Dependency Injection in BlockBase
9.15.3. Dependencies Injection in BaseForm


In previous articles, we covered such services, dependency injection (DI) and how to use them in your controller and block:
9.15. Services and Dependency Injection.
9.15.1. Dependency Injection in Controller
9.15.2. Dependency Injection in Block


In previous articles, we discussed what Services, Dependency Injection (DI) are and how to use them in your Controller:
9.15. Services and Dependency Injection.
9.15.1. Dependency Injection in Controller
Code examples can be viewed on github:
https://github.com/levmyshkin/drupalbook8


In the last article, we looked at what Dependencies Injection is:
9.15. Services and Dependency Injection.
This article provides sample code with Dependency Injection in a controller.
Code examples can be viewed on github:
https://github.com/levmyshkin/drupalbook8
/modules/custom/drupalbook/src/Controller/ModalFormContactController.php:


In Drupal we use hooks and services in custom modules from core and contrib modules, when we need to extend site functionality. We already used hooks in this article:
Let's work with services now. Service is a special PHP object. When you create a new PHP class in your custom module, it will be better to define it as a service, so your code could be easily usable and overwritten in other modules.


There are opinions that Drupal is complicated platform and it's hard to install and set up Drupal. But Drupal is under active development more than 20 years and for this time all approaches to install and set up Drupal are being constantly improved. Now you can install Drupal with Docker on virtual environment. Let's use Lando and install Drupal for 10 minutes.


In the previous article we had a look how to integrate Views modules with custom database for Did this help? module:
https://www.drupal.org/project/did_this_help
In this articles we will override Views filter for Choice (yes/no) field:


Views module is widely used in Drupal ecosystem. Lists of content, tables, blocks, slideshows, data export - these peaces of contents usually are displayed with Views. If you use Content types, Block types or another Entity types, then Views already integrated with them automatically and you can use Views to display your content. But for your custom module, where you use separate custom database table, which you created with hook_schema(), you should write integration with Views to display your module data in Views module UI.


Hi All! A new version of CMS Drupal number 8 has been released. The development of this version began as soon as the Drupal 7 was released in 2011. During this time, the 8th version has gone far from the 7th version.
