/[drupal]/drupal/modules/field/field.api.php
ViewVC logotype

Diff of /drupal/modules/field/field.api.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.46, Fri Oct 23 22:24:13 2009 UTC revision 1.47, Sun Nov 1 14:05:31 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: field.api.php,v 1.45 2009/10/22 00:49:12 dries Exp $  // $Id: field.api.php,v 1.46 2009/10/23 22:24:13 webchick Exp $
3    
4  /**  /**
5   * @ingroup field_fieldable_type   * @ingroup field_fieldable_type
# Line 632  function hook_field_widget_info_alter(&$ Line 632  function hook_field_widget_info_alter(&$
632   *   Array of default values for this field.   *   Array of default values for this field.
633   * @param $delta   * @param $delta
634   *   The order of this item in the array of subelements (0, 1, 2, etc).   *   The order of this item in the array of subelements (0, 1, 2, etc).
635     * @param $element
636     *   A form element array containing basic properties for the widget: #title,
637     *   #description, #required, #field, #field_instance, #field_name, #delta,
638     *   #columns.
639   * @return   * @return
640   *   The form item for a single element for this field.   *   The form item for a single element for this field.
641   */   */
642  function hook_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta = 0) {  function hook_field_widget(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
643    $element = array(    $element += array(
644      '#type' => $instance['widget']['type'],      '#type' => $instance['widget']['type'],
645      '#default_value' => isset($items[$delta]) ? $items[$delta] : '',      '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
646    );    );

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.2