Skip to main content
Start of main content.

Our blog

Welcome to our growing knowledge base.

Introducing the EntityFormController

Drupal 8 comes with many new concepts. A lot of work has gone into expanding on Entities and forms. One such concept is the EntityFormController. The EntityFormController is a controller class for the management of forms for entities. Say for example your module Foo defines an entity Bar. Say you want to provide a form for this entity so that users can set some properties or field values. In the past you would have created a hook_menu item to a drupal_get_form callback. In Drupal 8 we do it a better way. We define a class which implements the EntityFormController. The base class provides some pre-built entity goodness, and we can extend the class to add whatever we need.

Senior Developer

Panel layout basics to free you from Core's block

Like everything in Drupal, there is a slight learning curve when you make the leap to using Panels for your Drupal sitebuilding. This article aims to give you a brief and broad introduction to theming practices used when using Panels and its popular helper modules as your main site-building tools.

Front-End Developer

Controlling Access to Drupal 8 Routes with Access Checks

In the previous post, I looked at how to put together a basic route controller in Drupal 8, and restrict access by specifying permissions. But there are my situations where basic permissions aren't enough.

In Drupal 7 we had procedural access callbacks. In Drupal 8 we now have AccessCheck services.

This post takes you through how to use the new AccessCheck interface to provide a custom access checker for your routes.

Using Drupal 8's new route controllers

As part of the Web Services and Context Core Initiative, traditional procedural page callbacks were converted to shiny new Object Oriented route controllers. 

In this post, we cover the basics of creating a route controller, and how to pass in dependencies using dependency injection.

In following posts, we'll look at how to convert Drupal 7 custom access callbacks, to the new AccessCheckInterface, as well as dynamic routes.

Twigging Out at DrupalCon Portland

I spent most of this year's DrupalCon in the CoderLounge sharing tables with up to 20 other volunteer contributors profiling Twig.  We were making sure Twig could be merged into Drupal 8 without slowing it down. By Friday I had only managed to get a simple documentation patch committed, but I learned a lot about the contribution process, made some friends, and had a great time!

Front-End Developer