Download the PHP package cgm/config-admin without Composer
On this page you can find all versions of the php package cgm/config-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cgm/config-admin
More information about cgm/config-admin
Files in cgm/config-admin
Package config-admin
Short Description ZF2 module for easy administration of application settings
License BSD-3-Clause
Homepage https://github.com/cgmartin/CgmConfigAdmin
Informations about the package config-admin
CgmConfigAdmin
Version 1.2.1 Created by Christopher Martin
Introduction
Need to give clients access to website configuration settings?
CgmConfigAdmin is a ZF2 module for managing site-wide settings via a single web page.

Settings are exposed to the administration panel via a simple configuration format.
Module authors can also easily include their own specific configuration settings right from their module.config.php file.
UPDATES IN 1.2.1
Please see CHANGELOG.md.
Requirements
- Zend Framework 2
- ZfcBase
- A Database or Key/Value store
Installation
Composer / Packagist
Main Setup
- Install the ZfcBase ZF2 module
by cloning it into
./vendor/and enablingZfcBasein yourapplication.config.phpfile. - Clone this project into your
./vendor/directory and enableCgmConfigAdminin yourapplication.config.phpfile. - Copy
./vendor/CgmConfigAdmin/config/cgmconfigadmin.global.php.distto./config/autoload/cgmconfigadmin.global.phpand change the values as desired. - Import the SQL schema located in
./vendor/CgmConfigAdmin/data/schema.sql. - Navigate to
/config-adminand try it out.
Post-Install
Protect the /config-admin route with an authorization module, such as
ZfcRbac or
BjyAuthorize. The route can
be changed in the ./config/autoload/cgmconfigadmin.global.php file.
Database Adapter Configuration
If you do not already have a valid Zend\Db\Adapter\Adapter in your service
manager configuration, put the following in ./config/autoload/database.local.php:
See the Zend\Db\Adapter documentation for more info on how to configure the adapter for your specific database.
Configuring custom settings
Example:
Adding Configuration Groups from other Modules
Simply add a new config group and options for your module and they will be included
Usage
To retrieve a config value:
An instance of the CgmConfigAdmin\Service\ConfigAdmin service is registered in the Service Manager
under the alias cgmconfigadmin.
Events
Events below are emitted from the CgmConfigAdmin\Service\ConfigAdmin service:
Previewing Config Values
previewConfigValues : Before preview values are saved in the session.
- Param
configValues(ArrayObject) List of config values from form.
previewConfigValues.post : After preview values are saved in the session.
- Param
configValues(ArrayObject) List of config values saved in session.
Resetting Config Values
resetConfigValues : Before the previewed config values are reset.
- Param
configValues(ArrayObject) The current list config values in the session.
resetConfigValues.post : After the previewed config values are reset.
Saving Config Values
saveConfigValues : Before the changed list of config values are saved.
- Param
configValues(ArrayObject) The changed list of config values to be saved.
saveConfigValues.post : After the config values have been saved.
- Param
configValues(ArrayObject) The saved list of config values.
To attach event listeners:
All versions of config-admin with dependencies
zendframework/zendframework Version >=2.0.0
zf-commons/zfc-base Version >=0.0.1