As with all subclasses, the actual initialization is done in the initialize() function, not in the constructor, to allow for error handling.
It can only be bound to a select type (or subclass thereof), and inherits the configuration from there as far as possible.
Available configuration options:
Example: (The simplest ones)
'contacts' => Array
(
'title' => 'contacts',
'storage' => null,
'type' => 'select',
'type_config' => array
(
'multiple_storagemode' => 'array',
),
'widget' => 'chooser',
'widget_config' => array
(
'clever_class' => 'contact',
),
),
OR
'styles' => Array
(
'title' => 'styles',
'storage' => null,
'type' => 'select',
'type_config' => array
(
'multiple_storagemode' => 'array',
),
'widget' => 'chooser',
'widget_config' => array
(
'clever_class' => 'style',
),
),
package | midcom.helper.datamanager2 |
---|
boolean
Indicating SuccessAlso adds static options to results.
The default implementation works on the default field name, you don't need to override this function unless you have multiple widgets in the form.
This maps to the HTML_QuickForm_element::unfreeze() function.
Array
Valid values: 'both', 'start', 'end' and
Example:
'auto_wildcards' => 'both',
Attention: If the type defines constraints, they always take precedence
Example:
'constraints' => array
(
array
(
'field' => 'username',
'op' => '<>',
'value' => '',
),
),
Example: (in topics)
'generate_path_for' => 'extra',
Example:
'orders' => array
(
array
(
'lastname' => 'ASC',
),
array
(
'firstname' => 'ASC',
)
),
Example:
'result_headers' => array
(
array
(
'name' => 'firstname',
'title' => 'first name',
),
array
(
'name' => 'lastname',
'title' => 'last name',
),
),
Example:
'searchfields' => array
(
'firstname',
'lastname',
'email',
'username'
),