This plugin allow you to easily create a Yaml edition form. Just define the file(s) and the field(s) and that's done.
You can edit any Yaml file (your app.yml, or your customAwesomeConfig.yml, even both in the same form), and use all the sfValidator options you want.

This plugin allow you to easily create a Yaml edition form. Just define the file(s) and the field(s) and that's done.
You can edit any Yaml file (your app.yml, or your customAwesomeConfig.yml, even both in the same form), and use all the sfValidator options you want.

Check the README for more informations.

Developers

License

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.

Release 0.1.2 - 27/01/2010

Release 0.1.1 - 26/01/2010

Release 0.1.0 - 13/01/2010

daYamlEditorPlugin

This plugin allow you to easily create a Yaml edition form. Just define the file(s) and the field(s) and that's done.
You can edit any Yaml file (your app.yml, or your customAwesomeConfig.yml, even both in the same form), and use all the sfValidator options you want.

Important notice

Use this plugin at your own risk,
if you dont "ignore" the yaml files in your rsync and subversion settings, all your online modifications will be lost at your next deployement.
So I suggest to add your edited yamls in the rsync_exclude.txt file and off course in your backup strategy.

Important notice 2

All the Yamls files edited will lose their comments

Installation

Install the plugin (download the package, or use a svn:externals)

http://svn.symfony-project.com/plugins/daYamlEditorPlugin/trunk/

Active the plugin in your ProjectConfiguration

$this->enablePlugins('aNicePlugin', 'daYamlEditorPlugin');

Enable the daYamlEditor module in your settings.yml

all:
.settings:
enabled_modules: [default, daYamlEditor]

Create your daYamlEditor.yml file and save it in one of your config/ dir.

If $daYamlEditorName is null, all the blocks are used (it's the default behavior of daYamlEditorForm).

The next step is to build your form action :

publicfunction executeIndex(sfWebRequest $request){$this->form = new myYamlEditorForm();
if($request->isMethod('post')){$this->form->bind($request->getParameter($this->form->getName()));
if($this->form->isValid()){if($this->form->save()){// Do what you want, the config file is saved}}}}

You can also override daYamlEditorActions, it's up to you.

Tips

Clear the cache after updating a config file

If you need to clear the cache after edit some yaml (that's sound obvious), you will need to do it manualy.
You can connect some code to the daYamlEditor.save event :

Remove the "Doctrine" style on my form

By default, the form markup is close to the Doctrine Admin Generator one, thanks to the sfWidgetFormSchemaFormatterDaYamlEditor formatter. That's allow you to have consistant backend style. To remove this behavior, you can call this method :