Skip to main content
Home
Drupal Developer

Main navigation

  • My modules
  • My work
  • Articles
  • Contact
Language switcher
  • English English
  • French French

dependency injection

By Jean, 22 January, 2019

Dependency injection when extending a class that implements ControllerBase

Drupal dependency Injection
Here is an almost typical use case when developing custom code for Drupal 8. A third party module declare a controller with a method that you want to override because you need to change the logic and there is no practical way to do it in the module (could be a hook). But this class implements ControllerBase with dependency injection, (and override most of the methods in ControllerBase, but this is...
More

Tags

  • drupal 8
  • custom code
  • dependency injection
  • Read more about Dependency injection when extending a class that implements ControllerBase
dependency injection

About me

Jean Valverde

Jean Valverde

Php developer
Drupal expert
Bordeaux / Paris - France

Contact me

I offer various services on PHP, Drupal development, audits, training and deployment.

Contact me for a free quote on any Drupal / Php related project at contactatdeveloppeur-drupal [dot] com (contact[at]developpeur-drupal[dot]com)