When:
to
Room:
Room 4 (122-123)
Tags:
drupal showcase, drupal & open source 101
Track:
makers & builders

Drupal's Bundle Classes to Better Code

Drupal's Bundle Classes to Better Code

Santhosh Kumar Gurram (santhosh21)

Bundle classes are PHP classes that define the structure and behavior of an entity bundle. Bundle classes in Drupal can help to separate logic and reduce coupling between modules by providing a centralized location for entity-related code.

Prerequisite
Drupal hooks and Events and Symfony concepts

Outline
By using bundle classes, developers can define and manage the structure and behavior of entities in a self-contained way, without relying on hooks or other global functions.

Learning Objectives
Creates the possibility of improving the maintainability and quality of our PHP code.
Drupal itself has no opinion on how you should structure your code, but this change allows you to use whatever object oriented style/design/paradigm you prefer.
Expose functionality directly to Twig templates without preprocess layers, and significantly improve the developer experience (DX) for site builders.