You are here

function brightcove_cck_widget in Brightcove Video Connect 6

Same name and namespace in other branches
  1. 6.2 brightcove_cck/brightcove_cck.module \brightcove_cck_widget()

Implementation of hook_widget().

File

brightcove_cck/brightcove_cck.module, line 452
Brightcove CCK module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.

Code

function brightcove_cck_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  switch ($field['widget']['type']) {
    case 'brightcove_cck_browser':
      $element = array(
        '#type' => 'brightcove_cck_browser',
        '#default_value' => isset($items[$delta]) ? $items[$delta] : NULL,
        '#value_callback' => 'brightcove_cck_browser_value',
      );
      break;
  }
  return $element;
}