Snippet on how to remove all users with a certain role in drupal.
I play a lot with importing and exporting content lately. When I remove content, the created menu items need to be removed automatically. Here's a snippet on how to delete all links in a menu.
Goodbye preprocess functions! Welcome to drupal 8. We use a nice plug-in to get control over our menu item and to show html inside the title. In this case we show a counter of the amount of messages a user has.
Some parts of custom entities seem different from nodes, but mostly they aren't. Small snippet for showing a created date of a custom entity in a controller
Quick tutorial on how to serve a PDF that downloads automatically in your browser in drupal 8.
Sometimes simple tasks like changing a page title of a system page can be hard. Luckily, drupal 8 provides clean ways to do that. In this tutorial some info about RouteSubscribers.
When creating seed data, for example in your modules hook_install() script, creating a menulink can be necessary. This snippet shows how.
Getting the output like you want it to be an be quite a challenge in drupal. This snippet shows you how you can add markup to your form labels in drupal 8.
In drupal 8, each entity will get a UUID assigned automatically. With this snippet you can check if it is a valid one.