A
A
alex4answ2020-04-24 12:31:35
PHP
alex4answ, 2020-04-24 12:31:35

How to add a field to the form of another module from a module?

There is a module, let's call it "Settings", it renders the form and processes it.

There is an "Additional settings" module, it is supplied separately, how can I add fields to the "Settings" from the additional one?

There is an option to use "hooks":

  1. Making an EventDispatcher / HookDispatcher for the "Settings" module.
  2. in the bootstrap of the "Additional settings" module, we weigh the handlers on the Event / Hook Dispatcher


The EventDispatcher will only handle events, saving, etc., etc.
HookDispatcher will accept and display html in certain places.

How is this implemented?
Am I approaching the problem correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question