August 2014

Last week we got started with the process of upgrading a block from Drupal 7 to Drupal 8. This week we create our first Drupal 8 plugin, do a bit of troubleshooting with the settings and replace out our hook_init() with a subscriber.

Next week we'll start digging into the State API to get more parts of our block moved over. Have a great week and enjoy!

A brief description of what a Drupal plugin is - 1:41

Plugins can be found throughout Drupal. They are a pattern that are used for the code the generates fields, widgets and blocks, among other things. In this short video we talk briefly about what plugins actually are and how they work.

How to troubleshoot overlays not showing and how blocks are now actually block factories - 2:47

In this video we discuss how the block paradigm has shifted from creating blocks in our module to instead creating block factories. This is a lot of fun if you haven’t seen this particular feature of Drupal 8 before. Along the way we notice that settings dialog boxes don’t seem to be showing up, and we track down the source of that problem to an error in our Drupal 7 module code.

(FREE!) How to create a block plugin - 4:46

After perusing the code for a block plugin and digging a bit into the ideas behind plugins and annotations, it’s time to actually get something done! In this video we re-purpose an existing block plugin for our own and give it a whirl.

How to modify the default caching settings for a block plugin - 3:14

In the previous step we got our block plugin working, but we discover quickly that we can’t modify its contents. In this video we look at how the caching settings for our block plugin work and get them sorted out for the dynamic block we eventually want to add.

How to move our hook_init() code into a subscriber - 3:59

In a previous section we discussed how hook_init() has been replaced by several other techniques and demonstrated how to perform a redirect by adding a subscriber. In this video, we take care of generating a list of pages that have been visited using the same technique.

May your week be filled with awesomness.

- Chris Shattuck

Over the last couple of weeks, we've been working through the beginning stages of upgrading a Drupal 7 module to Drupal 8, and this week we dive into converting a block over to the new Block API. As part of the process, we also get to explore the idea of Plugins and how Annotations work. All fun stuff, enjoy!

How to find a good source in the user interface for an example block - 1:22

Now that we’ve installed our module, the next most important feature is our history block. In this video we see that our old block code isn’t going to cut it, so we look for an example we can draw from.

(FREE!) How to find a piece of code by searching for a unique string from the interface - 2:20

Throughout the process of upgrading our module we will use this strategy for finding the code responsible for creating particular output. In this video we explain the nuances of the “unique string search” technique and put it to use finding the source code for an example block plugin.

How a block plugin class is structured - 1:43

In this video we go through the structure of a simple block plugin.

What annotations are and how they work - 2:11

In the process of exploring a block plugin’s code, you might have noticed we were missing any unique identification for the block. To understand how we get that unique ID, we first have to take a little detour to understand the role of annotations in Drupal.

Overview of the alternatives to annotations, and why we're not using them - 2:11

Annotations might feel a little weird at first, partially because there are other ways we can be storing meta data about a particular chunk of code. In this video we discuss what the obvious alternatives might be and why we’re still using annotations anyway.

- Chris Shattuck

Last week we started looking at a Drupal 7 module from our "Drupal 7 Development Core Concepts", and this week we get down to business and start the process of upgrading it to Drupal 8. The way we'll approach the upgrade process is simple. We copy the module to a Drupal 8 site and try to install it. We run into issues pretty quick and explore a few places to look when tracking down upgrade problems and get the .info file converted over to something D8-friendly.

As we go through the full upgrade in the coming weeks, we'll explore many of the new areas of Drupal 8, including the Configuration API, changes to the Block API, the State API and lots more. It's going to be fun, and here are the 5 new videos for this week:

A tour of our Drupal 7 module's code base, part 1 - 5:03

After looking at what our modules does from the front end, in this video we start a thorough review of the entire module code base.

A tour of our Drupal 7 module's code base, part 2 - 3:26

In this video we complete our review of the full feature set of our Drupal 7 module. Onward to upgrading!

Getting our module to upgrade set up, and running into our first upgrade problem - 1:38

The basic strategy behind module upgrading is identifying the most important feature that has not been upgraded, testing it, and then fixing any problems you run into. In this video we try to install our module and run into some issues.

(FREE!) Overview of resources to use when upgrading a module to Drupal 8 - 3:47

Throughout the process of upgrading a module, you can expect to run into aspects of Drupal you don’t quite have your head wrapped around yet. As you bump into these, it’s good to have a set of resources handy. In this video we take a look at some core resources you’ll find useful.

How to upgrade a .info file to a .info.yml file and install our module - 3:37

In this video we complete the process of upgrading our info file to the new YAML format and actually get our module installed. Woot!

Have a great week!

- Chris Shattuck

Over the last several weeks, we've covered how to use various Symfony components and how to use them inside of Drupal modules. This week we wrap it up by looking at subrequests (which are kind of fun) and break down what we've been doing into 3 different types of knowledge groups (this one's a free video and helps to provide a simple framework for understanding why we've approached things the way we have in this series).

In the final video we're releasing this week, we begin the process of upgrading a Drupal 7 module to Drupal 8. We'll be going keep into the upgrade process over the coming weeks, covering most of the important new ideas and elements that come with 8, like plugins, the State API, the Configuration API, Twig and more. Enjoy!

(FREE!) The benefits of using an interface for a service - 0:53

Most services provide an interface to express exactly how they expect the service to be used. In this short video we talk a bit more about why that’s useful.

Overview of what we've covered, and how we're going to use the HTTP Kernel component to create sub-requests - 2:31

Up to this point, we’ve covered most of the Symfony components that Drupal 8 is leveraging. The one exception is the HTTP Kernel component. This is such a foundational component that you will likely never need to touch it, but in this video we demonstrate the one reason you might want to tap into it.

How to create a subrequest with the HTTP Kernel service - 3:17

In this video we demonstrate how to create a full request and response in the context of another request. It might not be clear immediately how useful this could be, but it sure is cool.

(FREE!) The three groups of knowledge that you need to work with Drupal 8 effectively - 2:47

Here we breakdown the type of skills and knowledge you need to work with Drupal 8. If you’re feeling overwhelmed at all, this video can help you split up the learning tasks in a way that can feel more manageable.

A tour of our Drupal 7 module's front-end feature set - 2:55

In this next set of videos, we’re going to be upgrading a module from Drupal 7 to 8. But before we do that, we’re going to spend a few moments reviewing what exactly our module does, so we know when we’ve successfully upgraded all of its features. In this video, we look at all of the front-end features, including a block, the block configuration and module configuration form.

Have a great week!

- Chris Shattuck

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:


Loading...
Contact us

Below are the supported keyboard shortcuts for our video player.

space
Start / stop video
shift
Go to next video
shift
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
1...9
Jump to a percentage (2 is 20%, for example)
f
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
$29
1 month
$156
6 months
10% off
$276
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
user
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.