By Kevin, July 10th, 2017

Overriding a service in Drupal 8 is pretty easy. Within your sites directory, you will see a file called default.services.yml. You can adjust these defaults by adding a services.yml file in the sites directory. This is common when you want to enable twig debugging when...

By Kevin, July 4th, 2017

Just wanted to drop a quick nod to a long awaited feature in PHP that other languages have enjoyed for a while now… type hints and return types.

On a current project, I had to implement my own user authentication service in Drupal 8. While writing my class, I added new methods that I...

Tags

By Kevin, June 20th, 2017

In my latest adventures in Drupal 8, I had to build out a multisite search with Solr.

While I will touch on that later, I wanted to call out something I learned today, which is how to inject dependencies to your Drupal class with non-native Drupal code.

What do I mean by that?...

By Kevin, June 2nd, 2017

I was doing an onsite with a client earlier this week, assisting in a demo of the Drupal 8 solution we were building for their team.

During the meeting, it was expressed that they wanted all instances of a text editor to have the same buttons and capabilities.

The way I had (and...

Tags

By Kevin, April 9th, 2017

On a recent project, we had taken a Pattern Lab based prototype and created a Drupal 8 theme from it. In order to track updates and stay independent of the work happening by the front end team, I added the Pattern Lab repo to the project as a git submodule.

This is a practical approach,...

By Kevin, February 16th, 2017

In Drupal, most breadcrumb generation and navigation is sufficient by basing it off of the menu hierarchy with the Menu Breadcrumb module.

This works great except in certain edge cases, such as nodes that do not have menu placement, and Views pages which may exist, but not have a set...

By Kevin, February 2nd, 2017

Just wanted to share a quick example of overriding a field output from Search API if the value isn’t exactly what you want.

In my case, I am indexing the URI of a node and have a design requirement to output it as a link in the result, but it has to contain the host and scheme (http://...

By Kevin, January 28th, 2017

Last week, I had to solve a problem where a prototyped form contained a button element and svg icon for the submit button on three search forms.

While you can change the type of a input from submit to button in Drupal 8, that does not change the tag the form...