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");
$masterUser->createUser();

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.