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.

1 Answer 1


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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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