1. Go to this page and download the library: Download irishdan/js-settings-bundle 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/ */
irishdan / js-settings-bundle example snippets
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new IrishDan\JsSettingsBundle\JsSettingsBundle(),
);
// ...
}
// ...
}
// The key can be a string...
$this->get('js_settings.settings')->addData('key', $values);
// The key can be an array...
$this->get('js_settings.settings')->addData(['first_key', 'second_key'], $values);
// The key can be index notation
$this->get('js_settings.settings')->addData('[first_key][second_key]', $values);