Drupal Core APIs
static methods in PHP
In PHP, classes are the natural unit of organization even for stateless logic. Here’s how to think about it:
The core organizing principle
Group by what the functions operate on or what they produce — not by how they feel related to you. The grouping should survive a new developer asking “where would I look for this?”
Practical approaches
1. Name by the operation/domain, not the pattern
Instead of StringUtils or StringHelper, ask what kind of string work it is:
Data Table Implementation Patterns in Drupal
General Code Review / PR Standards and Guidelines
The following is a collection standards, guidelines, and cultural norms
Why Dependency Inversion Is an Ancient Idea
When Drupal adopted Symfony’s service container, many developers experienced it as a paradigm shift — a new way of thinking about how software components relate to one another. But note the principle at the heart of this shift:
depend on abstractions, not on concretions
This is not a new idea at all. It is one of the oldest and most repeatedly discovered insights in human thought.
Farewell jQuery
JavaScript ordering in asset libraries in Drupal
Good question — the answer is yes, generally theme JS runs after module JS, but it's not simply "modules before themes" as a hard rule. Here's how it actually works:
The Primary Driver: Library Groups
The group constant is the biggest factor:
Group Constant | Value | Typical Owner |
|---|---|---|
| -100 | Core/contrib low-level libs |
| 0 | Modules Tags
Introducing the Node Base Field Display Manager for DrupalWhy I Created Node Base Field Display ManagerThe ProblemOne of Drupal's long-standing design decisions is that base fields like The thinking behind this appears to be: Tags
A Gentle Introduction to Configuration Management in DrupalDrupal's Config API is the standardized system for storing, retrieving, and synchronizing site configuration data (like views, Tags
Recent Content
Drupal Topics
Drupal Core APIs(34) Projects(14) Cache API(3) Field API(1) Drupal Security(1) Layout API(1) Form API(1) Entity API(1) Access Policy API(1)
|