Have you ever had to sort a view of nodes by a referenced taxonomy term? In our system, each staff member is entered as a separate node, containing the staff member's name, position and email address, and also containing the department the staff member works in. The department is a taxonomy reference field. We then have a view that pulls in each staff member's node, organized by department, and the departments are listed alphabetically.
In February, I built a WordPress plugin that allowed users to browse blogs by choosing a top-level category in one select box and then having whatever top-level category they select populate a second select box with the subcategories of that top-level category. I decided I would re-create that functionality as a Drupal 8 module.
For the moment, I just want to explore some of the features that I found particularly interesting in the module I wrote to show the old Drupal 7 posts in the left sidebar.
First, to access the JSON data that comes through the web service I set up on my Drupal 7 installation at http://webmech.biz, I used the Guzzle HTTP client library, which was added to the initial Drupal 8 release. The Guzzle API is object-oriented and easy to use:
At the office, we recently upgraded our staging server to PHP 7. For the most part, this caused no problems at all and worked very well (and faster!). But our event pages were failing, just giving us a white screen. I looked in the "Recent log messages," and saw this: "Error: Using $this when not in object context." The code that triggered this error was a non-static class method that was being called statically from within a different class. In PHP 5, this code only gives a "Deprecated" notice that non-static classes should not be called statically.
This is Article 9.
This is Article 8.
This is Article 7.
This is Article 6.
This is Article 5.
This is Article 4.