1. Home
  2. Docs
  3. Application
  4. Masters – Controllers
  5. Call a other master inside a master

Call a other master inside a master

You may need to use a method from another master: this is quite possible via an existing method in your current master:
Object getMaster(string $mastername)

You do not need to put the keyword “Master”, just the name of it.
This method is callable via $this. Thus you will have access to all the methods of this master.

Here is an example :

$masterUser = $this->getMaster("User");

Warning ! Although all methods of this master are callable, it is strongly discouraged to call an activity, indeed it will have the effect of sending an output.

Was this article helpful to you? Yes No

How can we help?