![]() |
|
sfDoctrineSettingsPlugin - 1.0.3Allows for settings to stored in the database and recalled for use in the application. |
|
![]() |
6
users
Sign-in
to change your status |
The sfDoctrineSettingsPlugin is a symfony plugin that provides app wide settings functionality. It automatically generates constant values based on sf_setting table values and make them accessible in every app module. |
The sfDoctrineSettingsPlugin is a symfony plugin that provides app wide settings functionality. It automatically generates constant values based on sf_setting table values and make them accessible in every app module.
| Name | Status | |
|---|---|---|
|
|
lead | moc.sngisedbewos <<ta>> wortsos |
|
|
lead | moc.ecanys <<ta>> ynofmys |
|
|
developer | moc.liamg <<ta>> egawnoj |
Copyright (c) 2007 Chris Wage
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Version | License | API | Released |
|---|---|---|---|
| 1.2.4stable | MIT license | 1.2.0stable | 22/02/2009 |
| 1.2.3stable | MIT license | 1.2.0stable | 22/02/2009 |
| 1.2.2stable | MIT license | 1.2.0stable | 22/02/2009 |
| 1.2.1stable | MIT license | 1.2.0stable | 09/02/2009 |
| 1.2.0stable | MIT license | 0.1.0stable | 01/02/2009 |
| Version | License | API | Released |
|---|---|---|---|
| 1.0.5stable | MIT license | 0.1.0stable | 19/12/2008 |
| 1.0.4stable | MIT license | 0.1.0stable | 09/12/2008 |
| 1.0.3stable | MIT license | 0.1.0stable | 02/12/2008 |
| 1.0.2stable | MIT license | 0.1.0stable | 18/11/2008 |
| 1.0.1stable | MIT license | 0.1.0stable | 08/11/2008 |
| Name | Channel | Version |
|---|---|---|
| sfDoctrinePlugin | pear.symfony-project.com | 1.0-1.1.0 |
Making the generator file look at a app.yml setting to decide whether to have the values editable on the list page or the edit page.
Upgrading the plugin to make it work with 1.2
Removing the save button from the list view if we're not using the single page display
Making the generator file look at a app.yml setting to decide whether to have the values editable on the list page or the edit page.
Changing my email on this package
This plugin allows the easy use of a basic dynamic settings table. It will create sf_settings, and allow the use of an admin generator interface (via the sfSettings module) in order to add/edit/delete settings.
Since loading a setting requires a query to the database, performance ramifications are best mitigated by using sfSettings:load() to pre-load settings in the action for use elsewhere, i.e.:
<?php sfSettings::load(array('setting1', 'setting2', 'setting3'));
If you have settings that you know you will want loaded by default for every action, you can put those in config/defaults.yml.
# /config/filters.yml settings: [ setting_name_1, setting_name_2 ]
However you will also need to add a filter to the chain so that your settings get loaded, i.e. the following lines at the top of appname/config/filters.yml:
# /apps/public/config/filters.yml settings: class: sfSettingsFilter
After the settings have been loaded, they are stored in memory for retrieval by sfSettings::get() (returns a string value) or sfSettings::getSetting() (returns an sfSetting object)
A admin/backend module also exists for managing the settings in the database. you must enable the module in order to access it
# /apps/backend/config/settings.yml
all:
.settings:
enabled_modules: [default, sfSettings]
The backend can be used to edit the variables as the plugin was originally built with the value for the setting being on the list page and editable from there, or it can behave like a normal admin-generated page. To make it behave like a normal admin-generated page with the list page only listing current settings with a link to edit the setting and the value being the second page add a setting to your app's app.yml file
# /apps/backend/config/app.yml
all:
sfSettingsPlugin:
edit_mode: standard_admin
rich=true