Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
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