How to get values from the neon file in Nette?

devquora
devquora

Posted On: Feb 22, 2018

 

If you store the constants inside parameters array in the neon file, you will be able to access it from presenter’s context like this:

// $this is instance of Nette\Application\UI\Presenter
$this->context->parameters['constants']
// $this is instance of Nette\Application\UI\Presenter
$this->context->parameters['constants']

source: https://stackoverflow.com/questions/37926060/how-to-get-values-from-neon-file-in-nette

    Related Questions

    Please Login or Register to leave a response.

    Related Questions