This plugin implements a propel behavior which permits to add slots to a propel object. Slots are additionnal fields added to the object depending of his type (template, class, etc.) stored in a extra table (sf_slots). Some tools (widget, methods, etc.) help to manage it.

This plugin implements a propel behavior which permits to add slots to a propel object. Slots are additionnal fields added to the object depending of his type (template, class, etc.) stored in a extra table (sf_slots). Some tools (widget, methods, etc.) help to manage it.

This plugin is mainly used by sfDynamicCMS plugin.

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.

The column map is used by the behavior to know which columns hold information it needs :

pk : Model column holding primary key (default : id)

template : Model column holding template name (default : template)

Usage

Configuration

Configuration permits to define templates and slots for different models.

First, each models can be listed in "sfPropelSlot" section, it is not compulsory but it will simplify plugin use.
When using this plugin with sfDynamicCMS Plugin, you don't need to configure plugin.

Each model have its own templates and slots configuration, then you must specify the section where each model slots & templates are setup.
Optionnaly you can define a default model.

For each model configuration:
* You can define default slot options by slot type
* you have to list available templates for the model, each template must have a title and optionally slots
* you must define all slots used by templates, each slots must have a title and a type and optionally options and parameters

Extends admin generator

Slot types options and params

Input : basic input field

Options and params are the same than object_input_tag

Text : textarea field

Options and params are the same than object_textarea_tag

RichText : rich textarea field

Options and parameters are the same than object_textarea_tag
"rich" option is true by default and there is some default tinymce_options
Parameters :
* rich (default : true)
* tinymce_options (default : )

Select : selectbox

2 way to use it :
* With a related class like object_select_tag, you have to define "related_class" option and maybe "peer_method" and "text_method"
* With a related class & method to retrieve available options : you have to define "related_class" AND "options_method" options

Checkbox : checkbox

Options and params are the same than object_checkbox_tag
Options :
* default_value (optionnal)