Download the PHP package masev/settings-bundle without Composer
On this page you can find all versions of the php package masev/settings-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download masev/settings-bundle
More information about masev/settings-bundle
Files in masev/settings-bundle
Package settings-bundle
Short Description Masev SettingsBundle introduce a settings system into eZ Publish 5.x, administration is possible thanks to an interface in legacy admin.
License GPL-2.0
Informations about the package settings-bundle
MasevSettingsBundle
Masev SettingsBundle introduce a settings system into eZ Publish 5.x, administration is possible thanks to an interface in legacy admin (AngularJS powered). All settings are injected in Symfony container as a parameter. There are compatible with the eZ Publish Config Resolver allowing you the define settings per siteaccess.
Install
Step 1: Download MasevSettingsBundle using composer
Add MasevSettingsBundle in your composer.json:
Now tell composer to download the bundle by running the command:
Composer will install the bundle to your project's vendor/masev/settings-bundle
directory.
Step 2: Enable the bundle
Enable the bundle in the kernel:
Step 3: Configuration
Edit your application config file to provide connections informations to your storage and to list the bundle wich contains configurable parameters.
Mysql example :
-
bundles : list of bundles that will contains configurable settings
For Mysql Storage you need to initialize the setting table with the following query :
Step 4: Declaring configurable settings
In your bundle, create a file name settings.xml in the folder
Settings key must have a category and sub_category name to be displayed correctly in the legacy UI.
Clear the Symfony cache :
At this step you should be able the define settings in the legacy UI (configuration tab in the eZ Publish Legacy Administration).
Step 5 : Query your settings
Now that you have define settings you can query them with the eZ Publish config resolver.
In a twig template you can use the getMasevSettings() Twig function.