You are here

function hook_eck_property_widget_info in Entity Construction Kit (ECK) 7.3

Defines ECK property widget types.

Return value

array An array of widget type definitions. The individual keys are the widget types. Each definition is an array with the following optional keys:"

'label': The human readable name of the widget type. 'property types': The ECK property types that the widget applies to. i.e. text, integer, decimal, positive_integer, language. 'settings': An array of the default settings for the widget if it has any settings. 'file': A file that should be included when processing widget forms. This file may contain all of the ECK property widget api hooks. For example defining the widget settings forms and the widget forms. 'file type': The type of file for the 'file' above. Default is 'inc'. 'description': Description to use as help text for property widget selection. 'value callback': The name of a callback function to use for processing the value returned by the widget before saving. See eck_property_widget_extract_value().

1 function implements hook_eck_property_widget_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

eck_eck_property_widget_info in ./eck.module
Implements hook_eck_property_widget_info().
3 invocations of hook_eck_property_widget_info()
eck_modules_disabled in ./eck.module
Implements hook_modules_disabled().
eck_modules_enabled in ./eck.module
Implements hook_modules_enabled().
eck_property_info_widget_types in ./eck.module
Returns information of property widgets from hook_eck_property_widget_info.

File

./eck.api.php, line 60
ECK's API documentation.

Code

function hook_eck_property_widget_info() {

  // Define a simple text widget type.
  $widget_types = array(
    'text' => array(
      'label' => t('Text'),
      'settings' => array(
        'size' => 60,
        'max_length' => 255,
      ),
      'property types' => array(
        'text',
      ),
      'file' => 'eck.property_widgets',
    ),
  );
  return $widget_types;
}