How to define Global Variables
Notice: This thread is very old.

- mkoubik
- Member | 728
In config.neon:
parameters:
foo: 'Hello world!'
In presenter you can access it by
$this->context->parameters['foo'], or even better by
registering presenter as a service (see below).
In your own services, you can pass parameters to constructor:
class MyService
{
private $foo;
public function __construct($foo)
{
$this->foo = $foo;
}
}
config.neon:
services:
- MyService(%foo%)