Drupal Planet Posts

Interfaces

I'm working on an OO Primer series. This is a screencast on Interfaces.

 

Drupal 8 AJAX button

I needed to implement "Add another" functionality on an entity form for a module I'm working on. The AJAX changes in D8 are subtle, but this was enough to derail me for a bit.

Objective: Show 1 text field on load. Provide a button that adds another text field with each click.

Running Tests in Drupal 8

The dust is still settling in core, but I wanted to get PHPUnit running on my D8 custom modules. I'm not going to go into how to write tests here, just how to run tests.

My problem was that PHPUnit was running core tests just fine, but it wasn't picking up my custom module tests. Initially I had my tests in: modules/mymodule/lib/Drupal/mymodule/Tests

I looked around core a bit and moved them to a new directory: modules/mymodule/tests/Drupal/mymodule/Tests

D8: Create a module

I'm dialing in my screencasting format and setup so i can start knocking these things out. I'll be setting up a dedicated site for videos.

 

API & Drush access to Pantheon with Terminus

I've spent more time extending terminus, and thought it would be a good time to write a little more about it.

Terminus is an API/Drush integration project, by Pantheon. At its base is an API they have exposed to access information and execute workflow functionality you would otherwise only have access to via their dashboard. Drush wraps the API and provides the shell power make for some awesome command line tools.

Drupal 8 Custom Page with Controller & Route config

The best way to learn is to teach! This is not much more than a Hello World module, but I took a crack at a short and to the point screencast on exposing a page from a module in Drupal 8.

 

Resources:

D8 Contrib Experience
http://d8cx.org/