Blog

List of AccessResult types in drupal 8 & 9

Drupal is using more and more AccessResult objects for access checking. Here is a list of all the access results available.

Blog

Set moderation state programmatically in drupal 8

Moderation states help you give entities a state in workflows. Here is how to update your entity programmatically to a published workflow.

Blog

Get the moderation state of entity or node programmatically in drupal 8

Worfklows are a powerful tool to add events and states to your entities.

Blog

Add a menu item to the drupal toolbar

I like being consistent over every back-end I make. Custom forms with settings need to be available from the toolbar.

Blog
Blog

How to make core version drupal 9 compatibe in module .info file

Make sure to edit the .info file to make your module compatible with drupal 8 & 9.

Blog

Delete users that never logged in in drupal 8

An important clean-up task on bigger websites is to remove unused accounts. This snippet does the work.

Blog

Get drupal version with drush

Simple command to get the current drupal version

Blog

Amazon lightsail instance down every day [fixed]

I hosted a hobby site on an aws lightsail instance but it went down almost every day. It took me long to find the issue. Here's how I solved it.

Blog

Get route of a views page with drupal console

I like drupal console a lot as a helper tool for development. In this snippet I wanted to get the route of a views page. The page is on /news-events.

Subscribe to