You are here

function openlayers_cck_theme in Openlayers 6.2

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

Implementation of hook_theme().

File

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

Code

function openlayers_cck_theme($existing, $type, $theme, $path) {
  $themes = array(
    'openlayers_wkt_widget' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'includes/openlayers_cck.theme.inc',
    ),
    'openlayers_cck_map' => array(
      'arguments' => array(
        'field' => NULL,
        'map' => NULL,
      ),
      'file' => 'includes/openlayers_cck.theme.inc',
    ),
    'openlayers_cck_formatter_default' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'gis input' => 'wkt',
      'file' => 'includes/openlayers_cck.theme.inc',
      'function' => 'theme_openlayers_cck_formatter_map',
    ),
    'openlayers_cck_formatter_openlayers_wkt' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'gis input' => 'wkt',
      'file' => 'includes/openlayers_cck.theme.inc',
    ),
    'openlayers_cck_formatter_map' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'gis input' => 'wkt',
      'file' => 'includes/openlayers_cck.theme.inc',
    ),
  );

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