Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

PHP Attributes

By admin, 1 August, 2026
Drupal 11.5 Route title property example using PHP route attributes

Route Attributes Now Support a Top-Level title Property in Drupal 11.5

The Drupal 11.5 Route title property introduces a small but welcome improvement to the routing system. Route attributes now support a top-level title property, making route definitions cleaner and allowing simple dynamic page titles to be defined directly alongside the route.

Tags

  • Drupal
  • Drupal 11.5
  • Drupal Core
  • Route Attributes
  • PHP Attributes
  • Routing
  • Dynamic Page Titles
  • Module Development
By admin, 2 July, 2026
PHP Attributes for Form Routes

Drupal 11.5: Defining Form Routes with PHP Attributes

Drupal 11.5 introduces another significant step toward modern PHP development by allowing form routes to be defined directly on form classes using PHP attributes.

Until now, every custom form required a corresponding entry in a module's .routing.yml file. With this new feature, many of those YAML definitions can be eliminated, making code easier to maintain and keeping route configuration close to the class it belongs to.

Tags

  • Drupal
  • Drupal 11.5
  • Drupal Core
  • PHP Attributes
  • Form Routes
  • Route Discovery
  • Symfony Attributes
  • Module Development
  • ConfigFormBase
  • FormBase
  • Drupal API
  • Modern PHP
By admin, 27 October, 2025

🧱 Drupal 11.3: Themes Now Support OOP Hooks

🚀 Introduction

Drupal 11.3.0 brings a powerful update for themers and front-end developers:
themes can now implement hooks using Object-Oriented Programming (OOP) with the #[Hook()] attribute — just like modules have been able to do since Drupal 11.

This means no more long procedural functions in template.php.
Instead, you can organize your logic cleanly in classes inside the theme’s src/Hook directory.

Tags

  • #Drupal Planet
  • Drupal 11
  • Themes
  • Hooks
  • OOP
  • PHP Attributes
PHP Attributes
Powered by Drupal