You are here

function theme_openlayers_cck_map in Openlayers 6

Same name and namespace in other branches
  1. 6.2 modules/openlayers_cck/includes/openlayers_cck.theme.inc \theme_openlayers_cck_map()

Theme function for openlayers_cck_map

1 theme call to theme_openlayers_cck_map()
openlayers_cck_wkt_element_process in modules/openlayers_cck/openlayers_cck.module
Process an individual element.

File

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

Code

function theme_openlayers_cck_map($field = array(), $map = array()) {
  $title = check_plain($field['widget']['label']);
  $description = content_filter_xss($field['widget']['description']);
  $output = '';

  // Check for errors
  if (!empty($map['errors'])) {
    return $output;
  }
  $output = '
    <div id="openlayers-cck-map-container-' . $map['id'] . '" class="form-item openlayers-cck-map-container">
      <label for="openlayers-cck-map-' . $map['id'] . '">' . $title . ':</label>
      ' . $map['themed'] . '
      <div class="description openlayers-cck-map-instructions">
        ' . t('Click the tools in the upper right-hand corner of the map to switch between draw mode and zoom/pan mode. Draw your shape, double-clicking to finish. You may edit your shape using the control points. To delete a shape, select it and press the delete key. To delete a vertex hover over it and press the d key.') . '
      </div>
      <div class="description openlayers-cck-map-description">
        ' . $description . '
      </div>
      <div class="openlayers-cck-actions">
        <a href="#" id="' . $map['id'] . '-wkt-switcher" rel="' . $map['id'] . '">' . t('Show/Hide WKT Fields') . '</a>
      </div>
    </div>
  ';
  return $output;
}