Drupal quick tip of the day: react differently to CLI calls
Sometimes you want to react differently, when the current script is running in a command-line environment. Here's how you can do this.
Drupal quick tip of the day: the "autocompleteclose" event
Today I want to introduce you to the lesser known "autocompleteclose" event that you can use for Ajax callbacks in Drupal's Form API.
How Drupal Commerce 2.x improved my skills
Being one of the first early adopters of Drupal Commerce 2.x by starting our first project in early 2016 (on alpha2 version) and soon after a second one, I originally planned to write a blog post soon after beta1 gets published. Unfortunately I was too busy at that time....
Why running \Drupal::entityDefinitionUpdateManager()->applyUpdates() in update hooks is bad
In this blog post I explain why running \Drupal::entityDefinitionUpdateManager()->applyUpdates() in update hooks is very bad. I've already seen this a few times now, and today it was one of times it caused a problem during updating a site.
Drupal's great little helpers: Random utility class
Drupal's API has a huge number of very useful utitlity classes and functions, especially in Drupal 8. Although the API docs are great, it's rather impossible to always find every little feature. Today I want to show you the Random utility class, which I've nearly overseen and found rather by accident.
2016 - the dawn of Drupal
If I had to find a movie title for a Drupal review of the past year, then I'd choose "2016 - the dawn of Drupal" because it was the first full year of Drupal 8, and D8 is really a game changer!
Why it is a bad idea to do function calls on injected services during instantiation in Drupal 8
Today I was tracking down a strange issue with a form submission and validation, which finally turned out to be the consequence of an unobvious wrong function call inside a class constructor.
User registration and login only with e-mail address in Drupal 8
At the beginning of the "Krampus" weekend, which became famous in the rest of the world thanks to the movie, I show you, how to realize hiding the username and only use e-mail address in user registration and login instead in Drupal 8. We had to accomplish this yesterday in a current Drupal 8 project. Having only a few hours left to delivery date and still some open issues to solve, we needed a quick solution....
Including image styles in your module or theme in Drupal 8
Today I have a small practical tipp for those, who want to include a custom image style in their module or theme in Drupal 8, including a best practice proposal.
Add custom menu item attributes in Drupal 8
We're currently working on a Drupal 8 project, where we need the possibility of adding class attributes to menu items. In D7, one would probably choose the menu attributes module to accomplish this. But unfortunately, there is currently no D8 port available. In this quick tutorial I'll show you, how to create your own tiny module to solve this problem.