eps & kaas

2014 marks the beginning of a new company called eps & kaas which I cofounded with 3 other people. We're a digital agency, providing services ranging from mobile applications, websites, consultancy and design.

While you can still contact us (and me, from time to time) for Drupal development, my personal focus is now on Android and iOS development, but also different web technologies like Symfony or Ruby on Rails.

You can find us on the web, Twitter and Facebook. Drop us a note if you think we can help you!

So what about contributions ?

No, I'm not leaving Drupal. However, it's not going to the main technology anymore in my day-to-day work which is why I'm minimising my work on contributed modules: Display Suite is now in the hands of Bram 'aspilicious' Goffings, who has been a major contributor for the module since years. Most other projects have found a new maintainer, others are still waiting, maybe you're interested ?

I'm still around co-maintaining Field API for Drupal 8, or helping out in other areas that interest me, most notable the new configuration management system. We're slowly seeing the end of - yet another - long development cycle, hopefully marked with a release in june. The next big effort to get as many as bright minds together in one place is happening in March for the Drupal Developer Days in Szeged, Hungary. Anyone can help out in different ways: programming, reviewing, playing music, sponsoring plane/hotel tickets and so on.

Music and play

I've been writing songs since september for an album I want to get out this year - no release date yet. This is currently on hold as I need to rehearse songs to play with Last Exit To Loonville on the preselection of Humo's Rock Rally on the 25th of january in Gent. Tickets and more details are on the site of the Vooruit where the event is taking place. So, 8 years after my first appearance on Belgium's biggest rock talent event and more or less the last time I've been on a big stage, I'm back. What a great feeling that will be.

And, as if this year isn't going to be busy enough, I've started writing a play. The goal is to get it performed somewhere in october, so there's still some six months to finish the script. The main characters are alive in my head, the plot is as good as ready; if you're into a bit of absurdness and feel like Mark Everett and the theories of his dad are interesting topics, you'll want to attend this!

I'm sure 2014 is going to be a fantastic year, let it be a great one for you too!

Drupal 8 Field API series part 4: entity (form) displays and display modes

This is part 4 of the Drupal 8 Field API series. We skipped part 3 about field types as the dust hasn't settled yet in terms of API changes. Once we get there, we'll make sure we'll talk about the massive changes that have happened in that area.

In this part, we'll talk about new API's which are, strictly speaking, not part anymore of Field API, they now belong to the Entity Field API. However, the reason the changes exist, directly comes out of a big problem in Drupal 7 in Field API: scattered storage.

Entity display

In Drupal 7, parameters controlling how to render the various "parts" of an entity view in a given view mode were scattered in many separate locations:

  • in $instance['display'] for each individual (Field API) field in the bundle
  • in the 'field_bundle_settings_[entity_type]_[bundle]' variable for the 'extra fields' in the bundle
  • in other places for contrib additions that are not one of the two above (most notably field_group module)

In Drupal 8, all those parameters ("options") for all those parts ("components") are centralised in one single EntityViewDisplay configuration object - which means they can be deployed with CMI - for each entity bundle and view mode. You can access these objects with the entity_get_display() function. All available methods can be found in EntityDisplayInterface.

<?php
entity_get_display
('node', 'article', 'default')
 
// Set 'component_1' to be visible, with weight 1.
 
->setComponent('component_1', array(
   
'weight' => 1,
  ))
 
// Set 'component_2' to be hidden.
 
->removeComponent('component_2')
  ->
save();
?>

Also new in D8 is that all entity and field rendering hooks now receive this EntityDisplay object as a parameter. This means you have direct access to the configuration in your functions, instead of having to figure them out by calling functions to get the definition of field instances, extra fields or other configurations. For the full list of all hooks affected, scroll to the resources part at then end of this article for the change record link.

<?php
function hook_node_view(Node $node, EntityDisplay $display, $view_mode, $langcode) {
  if (
$display->getComponent('mymodule_addition')) {
   
$node->content['mymodule_addition'] = array(
     
'#markup' => mymodule_addition($node),
     
'#theme' => 'mymodule_my_additional_field',
    );
  }
}
?>

Note that currently only Field API fields and extra fields are handled by the EntityViewDisplay object. This is going to change when we introduce component type plugins so everyone will be able to store and access configuration. For more information, follow https://drupal.org/node/1875974.

Entity form display

Just like with the display settings, form settings are scattered all over the place:

  • in $instance['widget'] for each individual (Field API) field in the bundle
  • in the 'field_bundle_settings_[entity_type]_[bundle]' variable for the 'extra fields' in the bundle
  • in other places for contrib additions that are not one of the two above (most notably field_group module)

In Drupal 8, all those parameters ("options") for all those parts ("components") are centralised in one single EntityFormDisplay configuration object for each entity bundle and form mode.This object uses the same EntityDisplayInterface as the EntityViewDisplay object. The consequence of this API is the birth of the counterpart of view modes: form modes.

The direct use case for this was the hacky workaround in Drupal 7 for showing Field API fields on the user registration page. In Drupal 8, you can now configure which fields are available on the user registration page or the edit page. However, more interesting possibilities with this new API will certainly pop up when Drupal 8 is released, most notable inline entity forms.

UI impact

In Drupal 7, the place to manage the fields and control the order in forms is done on the 'manage fields' screen. In Drupal 8, this has has been split out in the 'manage fields' and the 'manage form display' screens. Widget settings are now also managed on this new screen, which allows you to have different widget settings depending on the form mode. The form displays screen also have a 'hidden' region, which allows you to hide certain fields on certain form modes.

Display modes

Drupal 7 has the concept of 'view modes', previously build modes in D6. In D8, we now also have form modes and both of them are configuration entities. Drupal 8 also ships with a UI to manage these display modes. You do not have to rely anymore on contributed modules like 'View modes' or 'Display Suite'.

Resources

An open source app for DrupalCon Prague

DrupalCon Prague is approaching fast. In a few days, Drupal folks from all over the world will gather together in Prague to sprint, attend sessions, have fun etc. A few days ago, I was searching to see whether there was a mobile application available and turns out it wasn't. So me and a friend volunteered to create one based on the DrupalCamp app we've created a few weeks ago. They might be basic, but they do the job fine when you quickly want to check the schedule of the whole week.

The apps will be available for Android and iOS. The Android version is available on Play Store, the iOS version is currently in review, so fingers crossed!

Features include:

  • Built with speed in mind: native app
  • Works offline
  • Sessions and speakers
  • Create your schedule
    Note, does not sync with your account.
  • Maps integration when online

Collaborate

The code is available on GitHub, so anyone can easily send in bug reports, interface translations or create pull requests to make the applications even better. You can of course reuse and/or extend the code for future DrupalCons.

Proudly built by @swentel, @TimLeytens and @leenvs.

It's time to create an album

There was a time that I was a tiny rock star. At least in Gent. I played in a band, we even made into Humo's Rock Rally once, but got friendly declined to enter the next round. Then, real life starts and you forget a rehearsal or two, ending up alone again in your room. Just like you were 14 again, practicing chords on your first guitar. Nothing is wrong with that, but one piece is missing: an album.

From today on, I'm taking some months off from working professionally and will start recording songs and try and create my first album. And by the time it's released, I can start a new career. Simple plan right ?

Life after work

I'll be scheduling my time in a practical way so I've got time to help landing the remaining big patches for Drupal 8, together with the awesome Field API team. So don't worry, you will still see me in the queue. I might just paste some partial lyrics. And you'll find me at DrupalCon Prague where I'll be at the core sprints, probably trying out songs now and then while hacking.

Apart from that, I'll be travelling a lot, chilling in the garden reading books that have been waiting for me since ages or following some courses on Coursera. Life is just going to be extremely sweet the next following months.

For now, quoting one my best friends: rock on!

Topics 

music

An open source app for DrupalCamps

On september 14 and 15, Leuven will host the annual Belgium DrupalCamp. During those two days, people come together learning and discussing the open-source content management system Drupal. The program will be available on the website, but we decided to also create an application this year. We've tried to make it abstract as possible, so other Drupal events can easily built from the source code which is available online.

The apps will be available for Android and iOS. As soon as the program is ready, we'll publish them, so keep an eye out for the camp website, twitter or, of course, this article. The Android version is available on Play Store.

Features include:

  • Built with speed in mind: native app
  • Works offline
  • Sessions and speakers
  • Mark your favorite sessions
  • Maps integration when online

Collaborate

The code is freely available on GitHub, so anyone can easily send in bug reports, interface translations or create pull requests to make the applications even better.

Proudly built by @swentel, @TimLeytens and @leenvs.

So, who will make the Windows mobile and Firefox version ?

Pages

Subscribe to realize.be RSS