Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Thijs Feryn:
The Drupal 8 origin story with Larry Garfield
Nov 23, 2015 @ 12:28:57

Thijs Feryn has posted the latest episode in his series of video interviews with members of the PHP community he's caught up with at conferences. In his latest show he talks with Larry Garfield, one of the more well-known members in the Drupal community about the latest milestone in Drupal, the release of Drupal 8.

Today, November 19th 2015, marks the release date of Drupal 8. To celebrate this release, I decided to publish my interview with Larry Garfield today.

Larry is a key member of the Drupal community and a core contributor to the project. Throughout the conversation, Larry tells us the origin story of Drupal 8 and how the technical challenges lead to the adoption of technology from the broader PHP community such as Composer, Twig and a set of Symfony Components.

I hope you like the interview, it gives a nice behind the scenes look at the history of Drupal 8 and how Drupal reached out to the PHP community to create a more modern code base.

You can watch the video either through the in-page video player or directly on YouTube. You can also check out his previous interviews in this archive section on his site.

tagged: thijsferyn interview larrygarfield drupal drupal8 community

Link: http://blog.feryn.eu/2015/11/19/the-drupal-8-origin-story-with-larry-garfield/

Drupal 8.0.0 released
Nov 20, 2015 @ 09:16:35

If you're already a Drupal user you know the latest and greatest news. If not, here's the scoop - the latest major version of Drupal has been released with major reworks and updates across the board: Drupal 8.0.0.

Happy Drupal 8 Day! It has been a long time coming, and we couldn't be more excited to step into this next phase of Drupal development. There's no doubt it will usher in a new era of digital experiences, and we can't wait to see how it all unfolds.

Dries discussed what the release of Drupal 8.0.0 means for the community, and you can read his full post here. We also caught him traipsing through the streets of Belgium wearing a sombrero... for your viewing pleasure!

The post includes a video of the interview with Dries. The linked post also describes the updates and "transformation' Drupal has gone through in this latest release.

tagged: drupal8 release announcement interview driesbuytaert video

Link: http://www.acquia.com/blog/drupal-8/drupal-800-released/19/11/2015/3290246

SitePoint PHP Blog:
Custom Display Suite Fields in Drupal 8
Oct 15, 2015 @ 12:50:20

The SitePoint PHP blog has posted a new tutorial that's another Drupal-focused article explaining custom Display Suite fields in the latest Drupal 8. Display Suite is a popular Drupal module that's been ported from Drupal 7 to version 8. It provides lots of features to help you easily create these custom fields and integrate them into layouts with other core fields.

Without question, Display Suite is one of the most popular modules in Drupal’s contributed modules history. It allows the creation of layouts, fields and exposes all sorts of other powerful tools we use to build the presentation layer of our Drupal sites.

[...] In this article, we are going to look at how we can create our own Display Suite field in Drupal 8 using the new OOP architecture and plugin system. To demonstrate this, we are going to create a DS field available only on the Article nodes that can be used to display a list of taxonomy terms from a certain vocabulary. And we’re going to make it so that the latter can be configured from the UI, namely admins will be able to specify which vocabulary’s terms should be listed.

He starts with a brief introduction to Drupal 8 plugins and their structure. From there he gets into the creation of the VocabularyTerms class they'll use to define their custom DSField plugin. He goes on to create the default configuration, formatters and how to show a list of the current settings (a summary). He then creates the form where the plugin can be configured through the UI and how to render the resulting field.

tagged: drupal8 tutorial custom field displaysuite

Link: http://www.sitepoint.com/custom-display-suite-fields-in-drupal-8/

Thijs Feryn:
Interviewing Kristof De Jaeger and discussing Drupal 8 & Drupalcon
Sep 28, 2015 @ 11:16:20

Thijs Feryn has a post to his site sharing a video interview with Kristof De Jaeger talking about Drupalcon and Drupal 8 in general. Kristof is a well-known member of the Drupal community and has spoken at several events, including this year's Drupalcon Barcelona 2015.

Last week I had the privilege to chat with Kristof De Jaeger (AKA @swentel on Twitter) at Drupalcon in Barcelona. I did an interview with him and we talked about a bunch of things, all of which are somewhat Drupal related.

They talk about Drupal 8, Drupalcon and the community, "Headless Drupal" and Kristof’s role in the community. You can walk the video of the interview through the in-page video player or you can just get the audio over on Soundcloud.

tagged: interview video thijsferyn kristofdejaeger drupal8 drupalcon community

Link: http://blog.feryn.eu/2015/09/28/interviewing-kristof-de-jaeger-and-discussing-drupal-8-and-drupalcon/

SitePoint PHP Blog:
Drupal 8 Third Party Settings and Pseudo-Fields
Sep 15, 2015 @ 12:25:45

The SitePoint PHP blog continues their series looking at Drupal 8 with this new article from Daniel Sipos about third-party settings and pseudo-fields. Part one of the series can be found here

In the first installment of this series we started our journey towards creating some simple but powerful functionality. The goal we set was to have the possibility to load a form on each node page and to be able to choose which form type should be used on the different node bundles. [...] It follows to see how we can configure the core node types to use one of the plugins defined on the site and how to render the relevant form when viewing the node. But first, in order to have something to work with, let’s create our first ReusableForm plugin that uses a very simple form.

He starts back in with the creation of a first simple plugin to handle the form created in the previous part of the series, assigning the form to it via annotations. He then configures the node entities to be able to use the plugin via the services YAML configuration file. He then updates the .module with a function for altering node details and an entity builder. He updates the schema definition to be able to show the form and, finally, render the form out to the view with the assigned node entity types.

tagged: drupal8 series part2 thirdparty settings pseudofields form tutorial

Link: http://www.sitepoint.com/drupal-8-third-party-settings-and-pseudo-fields/

SitePoint PHP Blog:
Drupal 8 Custom Plugin Types
Sep 14, 2015 @ 11:08:06

The SitePoint PHP blog has posted an overview from Daniel Sipos covering custom plugin types in Drupal 8 and how you can combine them (custom forms) with node entities.

In this article series of two parts, we will use this system to build a feature that allows the use of custom forms together with node entities. After we’re done, we’ll be able to do the following: configure node bundles to use one of multiple form types to be displayed together with the node display and easily define new form types by extending from a sensible base class. [...] We will get started by creating our custom plugin type. T

He starts with the plugin manager, showing you how to create a custom ReusableFormsManager in the module to set up the manager and add it to the system. He then sets up the plugin interface the manager is expecting to find. This piece defines methods to get the name of the plugin and to build the form. He then creates a simple ReusableForm annotation class and builds out the plugin base. This base class includes a form builder object used to build and output the custom form. Finally he gets into building the form and its matching interface. It's a simple "Contact Us" kind of form that outputs three fields (first name, last name, email) and a "Submit" button.

tagged: drupal8 custom plugin type tutorial form contactus

Link: http://www.sitepoint.com/drupal-8-custom-plugin-types/

SitePoint PHP Blog:
From Request to Response: A Journey into Drupal 8 Internals
Aug 18, 2015 @ 10:22:33

In a post on the SitePoint PHP blog author Daniel Sipos takes you on a trip through the Drupal 8 execution structure, from request to response, in the internals of the tool.

In the first article on Drupal 8 module development we looked a bit at the routing aspect of this process. We’ve seen that creating pages with paths is now a matter of declaring routes that match up with controllers. The latter, as we’ve seen, can return a render array that gets interpreted into markup and displayed in the main content area of that page. However, did you know that under the hood, Drupal actually transforms that array into a Response object according to the dictates of Symfony’s HTTPKernelInterface?

In this article, I would like us to go deeper into the internals of Drupal 8 (and Symfony2) and look at what actually happens (and can happen) from the moment a request is made by a user to the one in which they see something returned in response.

He starts at the initial point of the request, the front controller, and talks about the creation of the Request instance and it's handling by the HTTPKernel. He moves into the kernel and talks about the events that are triggered during execution and provides an illustration of the flow of the request all the way through to the response. He then "goes deeper" into looking at render arrays and the HTMLRenderer handling to manage the output of the page on the Drupal side.

tagged: request response drupal8 internals symfony httpkernel overview

Link: http://www.sitepoint.com/from-request-to-response-a-journey-into-drupal-8-internals/

SitePoint PHP Blog:
Drupal 8 Theming Revamped – Updates and New Features
Aug 11, 2015 @ 11:08:28

The SitePoint PHP blog has a tutorial posted introducing some of the updates to the theme functionality in Drupal 8 including some new features.

If you are a Drupal developer who has dabbled in theming older versions of Drupal (5, 6, 7) you understand why frustration is the trusty companion of any Drupal themer. Luckily, though, Drupal 8 promises so many improvements that even the Angry Themer is happy for a change. It is only natural we jump in and start looking at what these improvement are.

They talk about the changes in:

  • creating a module and defining its theme
  • that Twig is now the template library
  • updates to template handling
  • how to debug themes/templates
  • working with assets and libraries

Each topic includes a summary of the changes or more information about the topic including links to other resources with more information about each.

tagged: drupal8 update theme feature twig template debug asset library

Link: http://www.sitepoint.com/drupal-8-theming-revamped-updates-and-new-features/

Learning Drupal 8 from Boilerplate Code
Jul 30, 2015 @ 11:48:06

On the Drupalize.me site they've posted a guide to getting started with Drupal 8 based on the boilerplate code that already comes with the release.

Drupal 8 represents a lot of changes and a steep learning curve for many Drupal developers and themers. While many of these changes are exciting, there are many things to learn just to get started. One way to learn about the code involved with Drupal 8 modules and themes is to take a look at core's modules and themes for examples to follow. Another is to use a code-scaffolding tool like Drupal Console to generate boilerplate code and comments that you can learn from and then customize.

He makes the assumption that you already have a development environment set up and working then helps you install the Drupal Console for use in the rest of the tutorial. You can then use this command line tool to create a new Drupal 8 installation and generate the boilerplate code for a new theme. Finally, they show the creation of the two other related components: a new module and a block plugin instance. These are generate generic code you can use as a reference point for either updating your current Drupal projects or create new ones.

tagged: drupal8 commandline console instance theme plugin block installation

Link: https://drupalize.me/blog/201507/learning-drupal-8-boilerplate-code

SitePoint PHP Blog:
How to Build Multi-step Forms in Drupal 8
Jul 07, 2015 @ 12:25:06

The SitePoint PHP blog has a post for the Drupal users out there showing you how to create multi-step forms in your application.

In this article, we are going to look at building a multistep form in Drupal 8. For brevity, the form will have only two steps in the shape of two completely separate forms. To persist values across these steps, we will use functionality provided by Drupal’s core for storing temporary and private data across multiple requests. In Drupal 7, a similar approach can be achieved using the cTools object cache. Alternatively, there is the option of persisting data through the $form_state array as illustrated in this tutorial.

They start by setting out what the end result will be - a simple two-page form with two fields each, allowing for navigation back and forth between the pages. They start with a base class defining requirements needed for both pages and setting up the necessary form structure. They walk through each part of this base class, explaining the functionality going along. With that in place they extend it with a "MultistepOneForm" and "MultistepTwoForm" classes extending the base and defining two fields on each.

tagged: tutorial drupal drupal8 multistep form

Link: http://www.sitepoint.com/how-to-build-multi-step-forms-in-drupal-8/