You are here

function openlayers_cck_field in Openlayers 6

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

Implementation of hook_field().

File

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

Code

function openlayers_cck_field($op, &$node, $field, &$items, $teaser, $page) {
  switch ($op) {
    case 'validate':

      // Check if field is valid WKT format
      foreach ($items as $delta => $value) {

        // @@TODO: validate WKT
      }
      break;
  }
}