
It is super simple but we will start from the very beginning in order to be on the same page.
In this video we will quickly install Drupal 8 with the help of Acquia Dev Desktop.
We are going to download and installing the Devel module from drupal.org.
Afterwards we are going to activate it, the Devel kint module and the Web profiler module.
It is very important to be able to see the error messages while developing.
This way you will receive hints regarding where is your error and thus you may fix it faster.
In this video we are going to create the very basic structure of our module.
We will declare it by creating it's folder and .info.yml file.
As it would be appearing under Extend - we would be able at the end to activate it.
In this video we would start writing code. Our task would be to create a custom page, with it's own path and with some custom content.
We are going to achieve that by first declaring our own controller class and then creating a .routing.yml file to assign a path and some other routing features to it.
*Try to write it yourself (while watching the video) and then you may compare with the final version of the module attached to this lecture.
Let's have a look at what is the benefit when our controller extends the ControllerBase class.
In this video we are going to move the markup from our custom controller to a custom twig template file.
In order to achieve it we would have to first declare our own theme implementation with the help of hook_theme and then use it when rendering the content of our controller. In the end the whole markup of our custom controller will be in a twig template.
We will be adding our own CSS file that would be included every time we use our twig template.
In order to achieve it we are going to declare our own .libraries.yml file and we are going to add a CSS file to our module directory. In the end we are going to include the library every time the twig template is included with the help of attach_library().
This is a video in which we are going to play a bit with the Animate CSS animations and the list of our super heroes.
Basically we are going to make each of the heroes from the list appear with a random animation from an array of animation effects.
In this video we are going to declare a custom block. In Drupal 8 the blocks are basically plugins of type Block. In any case we will create a peace of content that could be placed on various sections of your Drupal website.
We will learn about the Annotations, the structure of the block class and as we declare it at the end of the video we are going to place it on our Drupal page.
In this video we are going to take a look at one renderable array that we are going to implement in order to show the list of our heroes and their real names in an HTML table.
We are going to learn about the services in Drupal 8.
What are they ?
What are they for ?
What is the Dependency Injection Container ?
We are going to be implementing our own custom service in our custom module.
We are going to write the class of the service and then make it accessible by declaring it as a service through the .services.yml file.
We are going to see an actual example of one of the implementations of Dependency Injection in Drupal 8.
It will be of injecting an existing service into our own service.
In this video we are going to see the second most common example of using Dependency Injection(or first, but definitely one of the two most important ones ) as we are going to inject our custom service to our custom controller.
We are going to learn how to create a custom form, assign it to a custom path and act on it's submission.
We are going to take a look at example of some form elements that you might need in your future forms.
We are going to take a look at the following form elements examples:
With the help of this magic hook we are going to see how we could alter any form in our Drupal installation.
We are going to declare this hook to our .module file and use it to hide a field and to alter a label of a field.
Here we are going to learn how we could validate forms in Drupal 8.
We will see an example how to add a validation to our custom form and also of how to add a validation to any form in our Drupal installation with the help of hook_form_alter().
AJAX forms are forms with which we are interacting without the need of page refresh.
In this video we are going to convert our heroes challenge form into an AJAX variant that will return the winner of the challenge without refreshing the page.
The Configuration Management is one of the greatest things about Drupal 8. Through it you are basically able to store configuration with the help of Configuration API and export it to yml files and deploy it easily if and whenever needed.
In this video we are going to create our own admin page on which we are going to be able to set the header title of our heroes list page. We are going to create an admin form and a route for it and we are going to save this bit of configuration and make it editable through it.
The configuration for which we implemented a workflow for storing in the last video here we going to actually load and print on the heroes list controller page.
Disclaimer: in this video we are also injecting the config.factory service to our controller in order to be able later to load the configuration that we created. It is being done so that we could practice one more time how to inject a service to our controller. In the general case as we are extending the ControllerBase, the config factory is accessible directly from it.
It is rather the old way for one module to let intervention from other modules and to actually intervene, but it is still relatively popular in Drupal 8.
With the help of the declared hooks we are able to declare it to our own custom module and change something or do something on a particular event.
In this video we are going to learn some techniques to find Events that we could subscribe our event subscriber classes to.
We are going to learn to do it with the help of Drupal console
By searching in our codebase for @Event tag
By using the Devel web profiler module
In case you don't have composer installed in the "External Resources" section of this video you will find how to do it.
The event subscriber is a service class that we will declare that will enable us to subscribe to events our own custom callback functions.
We are going to declare two custom permissions to our module with the help of pamissions.yml file. Afterwards we are going to assign them to the registered users from our Drupal webpage from the Drupal user interface.
We are going to make our custom permissions do what they actually say they do:
Disclaimer: in this video we are also injecting the current_user service to our controller in order to be able later to load the object of the current logged in user and check it's permissions. It is being done so that we could practice one more time how to inject a service to our controller. In the general case as we are extending the ControllerBase, the current_user is accessible directly from it.
It has never been better time to learn Drupal 8 module development.
Thats because Drupal 8 is already the better technologically and the faster way to build Drupal applications (compared to Drupal 7).
Drupal 8 is built on top of Symfony so the good news are that as you learn how to create controller for example in Drupal 8 - the way you would do it in Symfony is quite the same and vice versa. Thats great because that actually means that the skills are transferable and that we are not going to be bogged down into endless drupalisms (Drupal-specific terms).
In this course we are going to learn the most popular sections of the Drupal 8 module development:
We are going to implement as much examples as possible and always I attached for you the final files so that you could easily compare with the final result and not waste time on tracing a tiny-tiny bug.
I tried to make it as clear as possible and to share as much as possible examples that I face in my everyday work process as PHP Drupal developer. The skills that are covered in this course are surely stuff that you would need if your are building complex Drupal 8 applications and are "Must have" as a knowledge for every Drupal developer...