Clients often have multiple sources of content. Entering the content twice, or copying content from external sources is time consuming, error prone, and difficult to manage. Loading data via an API is important (and a skill this workshop will teach), but there are cases where also syncing that data and storing it within Drupal can be very useful. For instance, maybe you want that content available in your search, or maybe that content is User Accounts from a customer relationship management system, or maybe the performance of the API is just not good enough.
This workshop will take you through:
- Using Drupal to do make connecting to an external API painless
- Having Drupal do the heavy lifting syncing large amounts of data down to your site
- Converting that data into Drupal Entities so you can use it like any other Drupal contents in your views, templates, and other purposes
By the end of this workshop you will have written your own code to:
- Create a Service to connect to an API (sample APIs to consume will be provided)
- Create a form in your admin area to trigger a batch process using the Batch API to use the Service to sync the data down to your site
- Create new Entities and updating existing Entities in code
If we have time we will also cover:
- Using the same Service via the Migrate API to have Drush sync new items (or sync and update all items) at set intervals
- A decent working knowledge of Drupal and PHP.
- A laptop with a local copy of Drupal 8 ready to go.
- Recommended: PhpStorm or Visual Studio Code for editing code.