netleak/config-params

Getters to find out in which modes are the Nette application.

Installs: 6 116

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/netleak/config-params

1.3.9 2025-08-12 08:13 UTC

This package is auto-updated.

Last update: 2025-12-12 09:02:54 UTC


README

Getters to find out in which modes are the Nette application.

Installation

composer require netleak/config-params

Write this to config.neon

extensions:
    - Netleak\DI\ConfigParamsExtension

Usage

use Netleak\ConfigParams;

class BasePresenter extends Nette\Application\UI\Presenter {

	public ConfigParams $configParams;
	
	public function injectConfigParams(ConfigParams $configParams): void {
        	$this->configParams = $configParams;
    	}

	function startup() {
		parent::startup();
		$this->getTemplate()->setParameters(array('debugMode' => $this->configParams->getDebugMode()));
	}

}