Red Crackle Blog

Traits

We'll start from where we left off in the previous article on [PHP Interfaces](/blog/drupal-8/interface). If you haven't read it, please go and read it now, or get the free eBook on object-oriented programming from the right sidebar (below the content if you are viewing in mobile). In previous article on PHP Interfaces, we made `HondaAccord` class implement the `ContainerInterface` because it has a trunk. As a result, we could use `HondaAccord` class wherever `ContainerInterface` is used. But the code looks ugly!

Interface

If you are new to object-oriented programming, you might be confused about what an Interface is and how to use it. Read this post to clear that confusion.

Interfaces solve two problems:

Dependency Injection

If you are starting to learn about Drupal 8, you must have come across a term called "Dependency Injection". If you are wondering what it means, then this is the post you should read. Through examples, you will learn why dependency injection is useful for decoupling the code as well as unit testing effectively.

Free Drupal 8 Tutorials – An Exhaustive List

If you are starting to learn Drupal 8, you are probably overwhelmed by the number of blog posts that offer free tutorials on different aspects of Drupal 8. The only way to find all these tutorials is to search online. In this post, we have created an exhaustive list of the free resources online for mastering Drupal 8, organized by categories. Use these links as a reference when starting on your next Drupal 8 learning expedition. Perform a Ctrl+F search to quicky find the topic of your choice.

Getting Started

Inheritance

In Object Oriented PHP Programming post, you learned how to create classes and objects and how to use them in your code. In this post, we'll dig a little deeper and introduce the concept of inheritance. You will understand when to use it and the benefits associated with its use. You will understand Method Overriding in PHP. You will also learn when to set the visibility of properties and methods to public, protected or private. We'll continue where we left off in the previous post.

Object Oriented PHP

I am sure that by now you must have heard that Drupal 8 is using Symfony components and is based on object-oriented programming in PHP. If you are a Drupal 7 developer, then you may not know what is object-oriented programming or fail to understand the benefits it offers. In this post, you will learn the basics of object-oriented PHP programming so that you can start developing for Drupal 8.

Configure PHPStorm to debug Drupal 8

Devel module provides dsm() and dpm() functions to output variables on the page for debugging Drupal. But if the problem is more complicated, then that's not sufficient. You can simplify debugging tremendously if you stop code execution using breakpoints and then execute the application one step at a time. All IDEs that support PHP debugging, such as Eclipse, Netbeans, PHPStorm, etc., provide the functionality to put breakpoints in the code. But it requires quite a bit of configuration to make it work.

Creating the simplest headless Drupal 7 site

In What is headless Drupal post, you learned what exactly is headless Drupal. You also understood the two ways a headless Drupal application can be developed. You got to know of the advantages and disadvantages of both the approaches. In this post, you will create the simplest headless Drupal application possible in less than 15 minutes. By the end of this post, you will have a simple HTML page. On loading this page, JS will send a request to Drupal. Drupal will generate a random number and send it back to the JS.

Adding multiple SKUs of a product

This is tutorial #2 in the Drupal Commerce tutorial series. In the previous article, we showed you how to add a basic product along with a display to showcase that product in the front end. This article makes product addition and management smoother by using the Inline Entity Form module.

Adding A Drupal Commerce Product And Product Display

This article is the first in a tutorial series that teaches beginners how to configure a Drupal Commerce site. Follow this series to gain a basic understanding on how to build online stores of your choice. If you would like to see the full list of articles in this series, go to Drupal Commerce Tutorial page.

 
Ready to get started?REQUEST A QUOTE