1. Go to this page and download the library: Download geniv/nette-configurator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
geniv / nette-configurator example snippets
protected function createComponentConfig(IConfigurator $configurator): IConfigurator
{
// disable auto create ident
//$configurator->setAutoCreate(false);
return $configurator;
}
$this['config']->isEnable('ident'): bool;
$this['config']->getValue('ident'): mixed;
// echo value of ident
$this['config']->renderText('ident');
// return value of ident
$this['config']->renderText('ident', true);
// substitute logic
$this['config']->renderText('ident', null, 'arg');
$this['config']->renderText('ident', null, ['arg']);
// set data like translator
$this['config']->setTranslator('ident', 'text');
$this['config']->setEditor('ident', 'new text');
$this['config']->getDataByIdent('ident');