Midcom.helper.datamanager

From OpenPSA Wiki

Jump to: navigation, search

This Purecode Component is the first generation of the MidCOM Datamanager provides the MgdSchema functionality defined in the MidCOM Component Base Classes to other Components. It serves as a abstraction layer between MidCOM and the Midgard MySQL Database and can be manipulated through Datamanager Schemas.

[edit] Widgets

For each field, a widget for editing its contents must be specified. Most of these widgets only work with a few or just one datatype. A widget is defined as a class in the package midcom.helper.datamanager:

account
blob
checkbox
collection
communityhtml
config_radiobox - radiobox widget for configuration UIs
contactchooser - used in OpenPSA 2 to dynamically select Person objects with SQL LIKE queries (works in Firefox only)

Javascript-powered calendar selector

image
mailtemplate
markdown - PHP Markdown editor (textarea-style)
multiselect
radiobox
schemaselect
select
text

TinyMCE WYSIWYG HTML editor

The different widgets also have configuration options, for example:


widget_text_inputstyle: Enter "longtext" to create a textarea

[edit] Datatypes

Datamanager supports a number of datatypes, each of which is defined is a class in the package midcom.helper.datamanager.

account
array
blob
boolean
collection
communityhtml
integer
mailtemplate
markdown - PHP Markdown
multiselect
number
privilege
text
unixdate
Personal tools