From 4147b13e6fefbeae5905923330ff1f223f7a3ddb Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 5 Jun 2019 23:22:56 +0100 Subject: [PATCH] Update having-fun-with-drupal-8-php-libraries-drupalorg-api.md --- ...aving-fun-with-drupal-8-php-libraries-drupalorg-api.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/abstracts/having-fun-with-drupal-8-php-libraries-drupalorg-api.md b/abstracts/having-fun-with-drupal-8-php-libraries-drupalorg-api.md index 56b6e79..5ecb1ef 100644 --- a/abstracts/having-fun-with-drupal-8-php-libraries-drupalorg-api.md +++ b/abstracts/having-fun-with-drupal-8-php-libraries-drupalorg-api.md @@ -3,4 +3,10 @@ title: Having Fun with Drupal 8, PHP libraries and the Drupal.org API url: https://www.oliverdavies.uk/talks/drupal-8-php-libraries-drupalorg-api tags: [drupal, drupal-8, php, composer] --- -A demo of some of the open source projects that I’ve been working on lately that are based on information from the Drupal.org API, including a PHP library for the API itself as well as some Drupal 8 modules that use it. +Recently whilst I was involved in rebuilding an agency website, I started looking for a way to list our supported contrib projects from Drupal.org including information such as each project’s download and star count - similar to how I’d seen on other websites for their PHP projects on GitHub. + +This led me down a path of modern PHP development practices - firstly developing a separate PHP library for interacting with Drupal.org, and then writing a custom Drupal module that allowed the library to be configurable, as well as making use of Drupal’s user roles and permissions, routing and caching. + +I then also found another use-case for this library, to display the Drupalversary date for a user - i.e. when they created their account on Drupal.org - and to display a message if the current day was a user's Drupalversary. + +In this talk, I explain the approach that I took and some and the benefits of splitting code into separate packages, I'll demo the library itself before moving on to look at the code for and demo the Drupal modules that leverage it.