function gmap_debug_block in GMap Addons 5
Same name and namespace in other branches
- 6 gmap_debug/gmap_debug.module \gmap_debug_block()
- 7 gmap_debug/gmap_debug.module \gmap_debug_block()
Implementation of hook_block().
File
- gmap_debug/
gmap_debug.module, line 11 - Debugging helpers for gmap.
Code
function gmap_debug_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
return array(
'gmap_debug' => array(
'info' => t('GMap Debug'),
),
);
case 'view':
if ($delta = 'gmap_debug') {
drupal_add_js(drupal_get_path('module', 'gmap_debug') . '/gmap_debug.js', 'module', 'header', FALSE, TRUE, FALSE);
$output = '';
$output .= '<li class="leaf"><a href="" id="gmap-debug-forcesizecheck">' . t('Force size check') . '</a></li>';
$output .= '<li class="leaf"><a href="" id="gmap-debug-reboot">' . t('Reboot map') . '</a></li>';
return array(
'subject' => t('GMap Debug'),
'content' => "\n<ul class=\"menu\">\n" . $output . "\n</ul>\n",
);
}
}
}