 |
 |
 |
 |

Datamanager Parameters
Conventions used in this document:
- Any text that is in this font is considered code, a literal value, or the name of a file, folder, MySQL table, MySQL field, or a value in a MySQL field.
- Any text that is surrounded by angle brackets like <this> means that you should substitute it for your own value. Example: vconsole/modules/<module>/ means that you should substitute <module> for your own value like invoices for the Manage Invoices module.
- Any text that is surrounded by square brackets like [this] means that it is optional. Example: check_email($email, $error[, $dnscheck]); means that [, $dnscheck] is optional
- When you see ... in the code font, this means that you can add 1 or more items at that point. Do not actually include ... in your code.
The datamanager data structure (the $dms array). This is the full structure of the $dms array: (Remember the conventions used here as defined up top)
$dms = array(
'module' => '<module_id>',
'table' => '<mysql_table>',
'tableindex' => '<mysql_tableindex>',
[ 'editpermission' => '<edit_permission>',]
[ 'editpermissionfunction' => '<edit_permission_function>',]
[ 'ifnoitems' => '<message_if_no_items>',]
[ 'allowimport' => < allow_import>,]
[ 'importpermission' => '<import_permission>',]
'groupops' => array(
[array(
'label' => "<groupop_label>",
[ 'image' => "<groupop_image>",]
[ 'help' => "<groupop_help>",]
'action' => "<groupop_action>",
[ 'confirm' => "<groupop_confirm>",]
[ 'conftype' => "<groupop_conftype>",]
[ 'separator' => < groupop_separator>,]
[ 'extra' => "<groupop_extra>",]
[ 'extraval' => "<groupop_extraval>",]
[ 'ofunction' => "<groupop_ofunction>",]
[ 'submitform' => < groupop_submitform>,]
),]
[...]
),
'singleops' => array(
[array(
'label' => "<singleop_label>",
[ 'image' => "<singleop_image>",]
[ 'help' => "<singleop_help>",]
'action' => "<singleop_action>",
[ 'confirm' => "<singleop_confirm>",]
[ 'conftype' => "<singleop_conftype>",]
[ 'separator' => < singleop_separator>,]
[ 'extra' => "<singleop_extra>",]
[ 'extraval' => "<singleop_extraval>",]
[ 'ofunction' => "<singleop_ofunction>",]
[ 'submitform' => < singleop_submitform>,]
),]
[...]
),
'queries' => array(
'count' => '<count_query>',
'data' => '<data_query>',
[ 'index' => '<index_query>',]
[ 'reindex' => '<reindex_query>']
),
'data' => array(
'fields' => array(
'<mysql_field>' => array(
'header' => array(
'type' => "<header_type>",
'title' => "<header_title>",
[ 'charttitle' => "<chart_title>",]
[ 'help' => "<header_help>",]
[ 'sortfield' => < sort_field>,]
[ 'defrev' => < defrev>,]
[ 'align' => "<align>",]
[ 'valign' => "<valign>",]
[ 'width' => < width>,]
[ 'style' => "<header_style>",]
[ 'behavior' => "<behavior>",]
[ 'defaultview' => < defaultview>,]
),
'data' => array(
'type' => "<data_type>",
[ 'help' => "<data_help>",]
[ 'format' => "<format>",]
[ 'formathelp' => "<formathelp>",]
[ 'format_args' => < format_args>,]
[ 'exporthelp' => < exporthelp>,]
[ 'showtotal' => < showtotal>,]
[ 'datatitle' => < datatitle>,]
[ 'style' => "<data_style>",]
[ 'nocustomfilter' => < nocustomfilter>,]
[ 'customfilterfield' => "<customfilterfield>",]
[ 'queryfield' => "<queryfield>",]
[ 'edit' => array(
'type' => "<inline_edit_type>",
[ 'prepend' => "<field_prepend>",]
[ 'postpend' => "<field_postpend>",]
[ 'help' => "<inline_edit_help>",]
[ 'fielddata' => array(
[ 'value' => "<inline_edit_checkedvalue>",]
[ 'lineup' => '<inline_edit_lineup>',]
[ 'type' => '<inline_edit_colortype>',]
[ 'selectormodule' => "<inline_edit_selector_module>",]
[ 'selectorshow' => "<inline_edit_selector_show>",]
[ 'selectorval' => "<inline_edit_selector_value>",]
[ 'choices' => < inline_edit_choices>,]
[ 'attributes' => array(
[ '<name_of_attribute>' => '<value_of_attribute>',]
[...]
),]
),]
[ 'validate' => array(
[ 'required' => < inline_edit_required>,]
[ 'type' => "<inline_edit_content_type>",]
[ 'minlength' => < inline_edit_minlength>,]
[ 'maxlength' => < inline_edit_maxlength>,]
[ 'minnum' => < inline_edit_minnum>,]
[ 'maxnum' => < inline_edit_maxnum>,]
[ 'match' => "<inline_edit_match>",]
[ 'matchfailmsg' => "<inline_edit_match_failmsg>",]
[ 'nomatch' => "<inline_edit_nomatch>",]
[ 'nomatchfailmsg' => "<inline_edit_nomatch_failmsg>",]
[ 'failmsg' => "<inline_edit_failmsg>",]
[ 'unique' => array(
'table' => "<inline_edit_uniquetable>",
'tableindex' => "<inline_edit_uniqueindex>",
'fieldname' => "<inline_edit_uniquefield>",
[ 'failmsg' => "<inline_edit_uniquefailmsg>",]
)]
),]
)]
),
[ 'filters' => array(
array(
'label' => "<filter_label>",
'query' => "<filter_query>",
[ 'separator' => < filter_separator>,]
[ 'chartlabel' => "<filter_chartlabel>",]
[ 'chartfield' => "<filter_chartfield>",]
[ 'chartvalue' => "<filter_chartvalue>",]
[ 'help' => "<filter_help>",]
),
[...]
),]
[ 'importfield' => array(
'field' => '<import_field>',
[ 'type' => '<import_type>']
)]
),
[...]
)
),
'layouts' => array(
[array(
'name' => "<layout_name>",
'fields' => array(
'<name_of_field>',
[...]
),
),]
[...]
),
[ 'thumbnail' => '<thumbnail_function>',]
'lines' => array(
[< lines_to_load> => < ltl_default>],
[...]
),
'legend' => array(
[array(
'image' => "<legend_image>",
'label' => "<legend_text>",
),]
[...]
)
);
Do not actually include the square brackets [] or the three dots ... from the code above in your code. The square brackets define optional parameters in the data structure and the three dots means that you can insert 1 or more entries at that point. (Remember the conventions used here as defined up top). OK, now we will go over what each parameter should contain. (There are a lot of them)
NEXT: Datamanager Code Examples
COMMENTS There are no comments at this time.
|
|
 |
 |
 |
|