Event: DrupalCamp Pune 2023
Drupal 9.3 introduced Bundle Classes. Bundle classes allow us to encapsulate business logic into bundle specific classes. Wonder what are the ways we can use Bundle classes? We will be discussing various types of use cases that we can consider while implementing bundle classes.
In this session we are discussing:
What are the bundle classes
Easy and quick ways to define bundle classes using bca module.
How can we define the methods and use those effectively in twig templates
Impact of bundle classes in the theming
Get computed values from various fields of entity and use it
Write generic methods that are specific to entity’s requirements.
Creating reusable traits to share behaviours across entity-types and projects.
Demo Repository: https://github.com/mohit-rocks/bundle-classes-demo