26.02.2026 | Pascal Crott

Make Gin node edit form available for all content entities

Issue:

You want to use the Gin edit form for all content entities, including custom entities.

Solution:

The Gin Everywhere module was developed to solve this specific issue.

Weitere DevBits

12.12.2025 | Pascal Crott

Sort blocks inside layout regions by weight.

my_theme.theme
/**
 * Implements hook_preprocess_HOOK() for layout.html.twig.
 */
function hook_preprocess_layout(&$variables) {
  $layout = $variables['layout'];
  foreach ($layout->getRegionNames() as $region_name) {
    if (array_key_exists($region_name, $variables['content'])) {
      uasort($variables['content'][$region_name], [\Drupal\Component\Utility\SortArray::class, 'sortByWeightProperty']);
    }
  }
}
drupal
php
theme
Layout Builder
copy-paste
13.11.2025 | Peter Gerken

Twig debugging via IDE Breakpoint in PHPStorm with Drupal

Screenshot of PHPStorm config.
twig
debugging
PHPStorm
theme