You are here

function openlayers_cck_widget in Openlayers 6.2

Same name and namespace in other branches
  1. 6 modules/openlayers_cck/openlayers_cck.module \openlayers_cck_widget()

Implementation of hook_widget().

File

modules/openlayers_cck/openlayers_cck.module, line 312
This file holds the main Drupal hook functions and private functions for the openlayers_cck module.

Code

function openlayers_cck_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  $element = array();
  switch ($field['widget']['type']) {
    case 'openlayers_wkt_widget':
      $element['#type'] = 'openlayers_wkt_widget';
      $element['#default_value'] = $items;
      break;
  }
  return $element;
}