I am trying to wrap around my head as to what was the need for the Plugin API when the module system extends the Drupal core.


It is not modules vs. plugins. Plugins are competing against hooks, which they will eventually replace entirely, together with event subscribers and services. By the way, all are implemented by modules because you are not allowed to insert them in core directly.

| improve this answer | |
  • What is the advantage of plugins over hooks? – Binny Mar 10 '19 at 14:54
  • 2
    It is OOP code and much easier to understand, especially if you didn't write the code yourself. – 4k4 Mar 10 '19 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.