You are here

function openlayers_cck_theme in Openlayers 6

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

Implementation of hook_theme().

File

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

Code

function openlayers_cck_theme() {
  $themes = array(
    'openlayers_wkt_widget' => array(
      'arguments' => array(
        'element' => NULL,
      ),
    ),
    'openlayers_cck_map' => array(
      'arguments' => array(
        'field' => NULL,
        'map' => NULL,
      ),
    ),
    'openlayers_cck_formatter_default' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'gis input' => 'wkt',
    ),
  );

  // Create formatter theme functions
  foreach (openlayers_get_presets() as $name => $title) {
    $themes['openlayers_cck_formatter_openlayers_map_' . $name] = array(
      'arguments' => array(
        'element' => NULL,
      ),
      'function' => 'theme_openlayers_cck_formatter_map',
      'gis input' => 'wkt',
    );
  }
  return $themes;
}