In this tutorial, I will show you the power of abstract classes and how you can enforce subclasses to define certain functions. In this way, you can share logic but for things that are really specific to subclasses, you can force them to define certain functions, but with the specific logic required.
Additional resources
In this tutorial, I will show you how to extend an abstract class and ensure that all the methods that are required by the abstract class are included in this new class.
Additional resources
In this tutorial, I will show you how to handle new requirements for data storage by creating two smaller abstract classes out of our original data storage class. By creating these new abstract classes, we can build more flexibility into our code.
Additional resources
Now that we have created new abstract classes, we need to load and utilize them in our code. In this tutorial, I will show you how we can refactor our code to make use of our new abstract data loading classes.
We have an abstract class with methods that we require, but there’s no logic in these abstract methods. This is a perfect opportunity to use interfaces. In this tutorial, I will show you how to create and implement Interfaces. I will also explain how interfaces are useful when you will be sharing your code. But even if you’re not creating interfaces to share, chances are, if you’re using open source code — and definitely in Drupal — you will need to know how to implement interfaces.
Additional resources
Configuration Management
CourseWeb Services in Drupal
CourseComposer
TopicComposer is the preferred dependency management solution for PHP, is used by Drupal core, and is becoming increasingly popular for managing the modules and themes used for a Drupal project.
Use the Configuration API to access configuration data stored by a module, provide default configuration, create settings forms, and other tasks such as overriding settings for a local environment.
Controllers
TopicControllers are the portion of a Drupal module that handle responding to an incoming request with the appropriate response data.
CSS in Drupal
TopicCascading Style Sheets (CSS) files are added as an asset library through a theme’s libraries configuration file. HTML attributes, including classes and IDs, are commonly added in template files with Twig.
Drupal Console
TopicDrupal Console provides a command line utility for performing common site administration tasks, code generation scaffolding, and a Read-Evaluate-Print-Loop for interacting with your Drupal site.
Object-Oriented PHP
TopicObject-oriented PHP utilizes classes and objects to organize code into reusable chunks. This approach helps us organize complex applications, such as Drupal, into modular code called classes that can be reused across the entire system.
Routing
TopicDrupal's Routing API maps the URL of an incoming request to the code responsible for generating the content that is rendered in response.
Security
TopicKeeping a Drupal site secure requires monitoring security announcements, performing regular updates, and knowing how to properly use Drupal’s APIs to write secure code.
Services
TopicServices are objects that encapsulate the code for performing specific tasks in a reusable and decoupled way.
Twig is a template engine for PHP, which is the language used in Drupal. Twig can be used to design templates in generic PHP applications as well as Drupal themes.
Symfony
TopicSymfony is a set of reusable PHP components, and a framework for building PHP applications. Drupal makes use of various Symfony components.