Working on a Drupal module using composer

Altering Drupals composer.json to fetch a particular Drupal module git checkout.

Check your coding style on Drupal 8

http://www.cloudsprawl.net/wp-content/uploads/2015/07/shutterstock_232639537.jpg

Coding style?

Building software is a complex and sometimes tedious process in which you make errors and mistakes. Testing for errors is mostly done by running your website / code through tests either manually or automatically.

Checking for your code style like formatting and documentation flaws you can use a code sniffer. For PHP you can run phpcs using PHP_CodeSniffer.

Drupal core provides core/phpcs.xml.dist to tell phpcs what to test for.

My sync2dev script on Mac

# Sync database
# Fix before receiving files
# Get the files
# Fix after receiving
# Drupal 7 variant of cache-rebuild
# Login to site
# Make sure drush finds the features drush extension
# List features with changes

Delete and edit comments on closed node

Node closed comment delete

Having a forum you needs quick deletions of improper comments.

In Drupal 7 and Drupal 8 you have to visit admin/content/comments to do so. But then you loose the thread.

You could review and use this patch or add this to your custom module. The first needs review and testing. The later needs a Drupal coder.

Which route belongs to which path fragment?

Visualization some complex part of Drupal is helping understand Drupal better. This is about the menu tree using Graph Viz for a static SVG diagram and D3JS for a dynamic version.

The state of ReST in Headless Drupal 8

Drupal 8 ReST

One of the Drupal 8 initiatives was to make "headless" Drupal core work out of the box. Drupal now has a ReST API.

This allows you to use all the Drupal 8 features to edit your content but present the content not only on a Drupal frontend but also on mobile apps or anything else that can work with JSON data.

Using dreditor to triage issues

dreditor triage
For the mentoring sprint on friday @ https://amsterdam2014.drupal.org we'd like to use the dreditor tool plus one of its new pull request feature. To install this just visit https://dreditor.org/development/build and pick your browser icon from #93 Add support for stock responses (macro/templates). When it states 'Rebase needed' just ping ClemensTolboom @ irc as dreditor is still evolving.

Extending a Widget for numeric fields.

range versus number field
Looking for a HTML range field in Drupal 8 core I did not found one. First I tried to alter Number Widget but that was wrong. Just extend a suitable widget. The code is very short. But the display is not as good as one needs. Where is the min and max value? And the current value? The specs @ w3c html5 forms input range has some user agent rendering which does not give min, max or current value hints.

number field.

It's alive in space

Part of the dependency graph
Experimenting with the index file of https://github.com/clemens-tolboom/uml-generator-php lead to a nice animation.

Interested in ReST and HAL?

http://www.droidforums.net/galleries/photos/hal-9000.4475/
  1. Checkout the issue queue for HAL and ReST.
  2. Use the quickstart tool: https://github.com/build2be/drupal-rest-test.

Need HAL?

  1. Install HAL Browser on your site to see what we got till now.
  2. cd drupal-root