Skip to main content

Drupal News

Drupal.org - aggregated feeds in category Planet Drupal
https://www.drupal.org/planet/rss.xml

Drupal Planet

Matt Glaman: Dynamic type expressions in Drupal config schema

6 hours 23 minutes ago

Drupal's config schema YAML supports dynamic expressions inside square brackets that resolve to values from the surrounding configuration data at runtime. Most developers have seen them — [%parent.type] in field formatter schema is a classic example — but few understand exactly how they work or when to use them.

I found a Todoist task from December 4th, 2024: \Drupal\Core\Config\TypedConfigManager::replaceVariable blog post. (Yeah, you do not want to see my "Overdue" list.) I have no memory of what I was working on that day or why I went deep on this. But past-me clearly thought it was worth documenting, so here we are. If you've ever stared at [%parent.type] in a schema file and just accepted it as magic — this one's for you.

Checked
3 hours 44 minutes ago
Drupal.org - aggregated feeds in category Planet Drupal
Subscribe to Drupal Planet feed
most recent 30 from drupal.stackexchange.com
https://drupal.stackexchange.com/feeds?format=xml

Drupal StackExchange

Checked
3 hours 44 minutes ago
most recent 30 from drupal.stackexchange.com
Subscribe to Drupal StackExchange feed