class ip_geoloc_context_reaction_locate_visitor in IP Geolocation Views & Maps 7
@file Output javascript to locate visitor using GPS/Wifi.
Hierarchy
Expanded class hierarchy of ip_geoloc_context_reaction_locate_visitor
2 string references to 'ip_geoloc_context_reaction_locate_visitor'
- ip_geoloc_context_plugins in ./
ip_geoloc.context.inc - Implements hook_context_plugins().
- ip_geoloc_context_registry in ./
ip_geoloc.context.inc - Implements hook_context_registry().
File
- plugins/
ip_geoloc_context_reaction_locate_visitor.inc, line 7 - Output javascript to locate visitor using GPS/Wifi.
View source
class ip_geoloc_context_reaction_locate_visitor extends context_reaction {
function options_form($context) {
return array(
'locate_visitor' => array(
'#type' => 'value',
'#value' => TRUE,
),
);
}
function options_form_submit($values) {
return array(
'locate_visitor' => TRUE,
);
}
/**
*
*/
function execute() {
foreach (context_active_contexts() as $context) {
if (!empty($context->reactions['locate_visitor'])) {
/* drupal_set_message(t("Referer, %referer, path: %path, context: %context, reacting with %reaction", array(
'%referer' => $_SERVER['HTTP_REFERER'],
'%path' => drupal_get_path_alias(),
'%context' => $context->name,
'%reaction' => t('Locate visitor using GPS/Wifi'),
))); */
if (!ip_geoloc_same_path()) {
ip_geoloc_get_current_location();
}
}
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
property | |||
context_reaction:: |
function | Retrieve options from the context provided. | 1 | |
context_reaction:: |
function | Retrieve active contexts that have values for this reaction. | ||
context_reaction:: |
function | Settings form. Provide variable settings for your reaction. | 2 | |
context_reaction:: |
function | Clone our references when we're being cloned. | ||
context_reaction:: |
function | Constructor. Do not override. | ||
ip_geoloc_context_reaction_locate_visitor:: |
function | |||
ip_geoloc_context_reaction_locate_visitor:: |
function |
Overrides context_reaction:: |
||
ip_geoloc_context_reaction_locate_visitor:: |
function |
Options form submit handler. Overrides context_reaction:: |