Part 1:
How to get module parameters inside helper function?
I am trying to get the same module parameters inside the helper file.
class ModTestHelper { public function getFoo () { return $this; } } And then calling the getFoo() method in another file:
$result = ModTestHelper::getFoo(); print_r($result); Tells me Non-static method ModTestHelper::getFoo() should not be called statically though it lists the result for $this.
But if I use static function:
public static function getFoo () { return $this; } Then it would obviously tell me undefined variable $this. Sorry self also don't work.
I also tried with new instance instead of ModTestHelper::getFoo() but no luck.
Part 2:
How to get module parameters inside my module's custom form field type?
I am trying to use helper method inside fields:
mod_test/models/fields/foo.php //I have called require statement for helper // file before class declaration public function getInput() { //helper method here } So, I think there is another way to get the parameters of the module in the helper file.