pikl-cz / config-params
Gettery pro informace z contextu nette aplikace.
1.0.0
2017-05-10 08:55 UTC
Requires
- php: >=5.3.2
- nette/nette: ~2.4
This package is not auto-updated.
Last update: 2024-04-22 14:21:27 UTC
README
Gettery pro zjištění v jakých módech je nette aplikace.
instalace
composer require pikl-cz/config-params
implementace v config.neon
extensions:
- Pikl\DI\ConfigParamsExtension
použití
use Pikl\ConfigParams;
class BasePresenter extends Nette\Application\UI\Presenter {
/** @var Pikl\ConfigParams */
public $configParams;
public function injectConfigParams(ConfigParams $configParams) {
$this->configParams = $configParams;
}
function startup() {
parent::startup();
$this->template->debugMode = $this->configParams->getDebugMode();
}
}