Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
150 lines (141 sloc) 3.77 KB
<?php
// $Id$
/**
* @file
* StyleWriter
*/
module_load_include('inc', 'stylewriter', 'stylewriter');
/**
* Implementation of hook_views_api().
*/
function stylewriter_views_api() {
return array(
'api' => 2,
'path' => drupal_get_path('module', 'stylewriter') .'/views',
);
}
/**
* Implementation of hook_ctools_plugin_api().
*/
function stylewriter_ctools_plugin_api($module, $api) {
if ($module == "openlayers") {
switch ($api) {
case 'openlayers_layers':
return array('version' => 1);
}
}
}
/**
* Implementation of hook_theme().
*/
function stylewriter_theme() {
$path = drupal_get_path('module', 'stylewriter');
return array(
'stylewriter_rule' => array(
'arguments' => array(
'filter' => '',
'polygon' => array(),
'stroke' => array(),
'metawriter' => array(),
'point' => array(),
'marker' => array(),
'postfix' => array(),
),
'file' => 'stylewriter.theme.inc',
'template' => 'stylewriter-rule',
'path' => $path . "/views",
),
'stylewriter_color_swatch' => array(
'arguments' => array(
'color' => '',
'dist' => '',
'value_min' => '',
'value_max' => '',
'layer_label' => '',
),
'file' => 'stylewriter.theme.inc',
'template' => 'stylewriter-color-swatch',
'path' => $path . "/views",
),
'stylewriter_point_swatch' => array(
'arguments' => array(
'color' => '',
'dist' => '',
'value_min' => '',
'value_max' => '',
'layer_label' => '',
),
'file' => 'stylewriter.theme.inc',
'template' => 'stylewriter-point-swatch',
'path' => $path . "/views",
),
'stylewriter_document' => array(
'arguments' => array(
'rules' => '',
'data_url' => '',
'data_type' => 'shape',
'metawriter' => FALSE,
'layer' => FALSE
),
'file' => 'stylewriter.theme.inc',
'template' => 'stylewriter-document',
'path' => $path . "/views",
),
'stylewriter_legend' => array(
'arguments' => array(
'swatches' => '',
'value_min' => '',
'value_max' => '',
'label' => '',
),
'file' => 'stylewriter.theme.inc',
'template' => 'stylewriter-legend',
'path' => $path . "/views",
),
);
}
/**
* Implementation of openlayers_layer_type
*/
function stylewriter_openlayers_layer_types() {
return array(
'openlayers_layer_type_stylewriter' => array(
'title' => t('Stylewriter'),
'description' => t('Stylewriter Dynamic Maps'),
'type' => 'layer',
'path' => drupal_get_path('module', 'stylewriter') .'/includes/layer_types',
'file' => 'stylewriter.inc',
'layer_type' => array(
'class' => 'openlayers_layer_type_stylewriter',
'parent' => 'openlayers_layer_type',
),
),
);
}
/**
* Implementation of hook_openlayers_behaviors().
*
* This is a ctools plugins hook.
*/
function stylewriter_openlayers_behaviors() {
return array(
'stylewriter_polygoninteraction' => array(
'title' => t('StyleWriter Polygon Interaction'),
'behavior' => array(
'path' => drupal_get_path('module', 'stylewriter') .'/includes/behaviors',
'file' => 'stylewriter_polygoninteraction.inc',
'class' => 'stylewriter_polygoninteraction',
'parent' => 'openlayers_behavior',
),
),
'stylewriter_pointinteraction' => array(
'title' => t('StyleWriter Point Interaction'),
'behavior' => array(
'path' => drupal_get_path('module', 'stylewriter') .'/includes/behaviors',
'file' => 'stylewriter_pointinteraction.inc',
'class' => 'stylewriter_pointinteraction',
'parent' => 'openlayers_behavior',
),
),
);
}