A metaphor for Drupal module's inner workings

后端 未结 4 1976
夕颜
夕颜 2021-02-05 16:02

What is the best application workflow metaphor for Drupal module? In PHP frameworks we think MVC-style. How do we think inside Drupal?

Asumming I am writing some user-or

4条回答
  •  天命终不由人
    2021-02-05 16:19

    The Drupal hooks are called Listeners, or Observers in most OO languages. Though they technically folluw that pattern, don't expect the polishedness and maturity you will find in most OO languages and environments. Drupals hooks can be extremely inconsistent, limited in use or far too broad in use.

    Listeners, hooks, are the core Architectural principle of about everything in Drupal.

提交回复
热议问题