Drupal

PHP Attributes in Drupal: Modernizing Plugin Definitions

Introduction In modern web development, metadata plays a crucial role in providing additional information about the code, allowing for more dynamic and flexible functionality. In the context of Drupal, this metadata is often used to define plugin classes such as blocks, services, event subscribers, and routing information. Traditionally,...

by Siddhraj Purohit
Tag: annotation
30-Nov-2024

Grails

Using PostConstruct annotation with Grails Services

We can use PostConstruct with Grails Services and injected Spring Beans. This PostConstruct annotation can be used to annotate a method which needs to be executed after dependency injection to perform any initialization. [code] import javax.annotation.PostConstruct class PostConstructDemoService { @PostConstruct private...

by Ankur Tripathi
Tag: annotation
27-Aug-2012