Community

What is the 'array' of the $items variable in the hook field widget ?

1)How do we know the array keys of the $items variable ? who set the $items array keys in the first place?
2)Why they set $delta as the array value of $items ?
3)and who say that the $items array should be structure like that: $items[$delta]['rgb'].
I don't understand that..

/**
* Implements hook_field_widget_form().
*/
function color_example_field_widget_form(&$form, &$form_state, $field, $instance,
$langcode, $items, $delta, $element) {
$value = isset($items[$delta]['rgb']) ? $items[$delta]['rgb'] : '';
$element += array(
'#delta' => $delta,
);
$element['rgb'] = array();

* this is a part of a code from the Pro Drupal Develpment

nobody click here