function yandex_metrics_main_settings_submit in Yandex.Metrics 7.2
Same name and namespace in other branches
- 6.2 yandex_metrics.module \yandex_metrics_main_settings_submit()
- 6 yandex_metrics.module \yandex_metrics_main_settings_submit()
- 7.3 yandex_metrics.module \yandex_metrics_main_settings_submit()
- 7 yandex_metrics.module \yandex_metrics_main_settings_submit()
Form submit handler for yandex_metrics_main_settings form.
File
- ./
yandex_metrics.module, line 136 - The main code of Yandex.Metrics Counter module.
Code
function yandex_metrics_main_settings_submit($form, &$form_state) {
$counter_code = $form_state['values']['yandex_metrics_counter_code'];
$visibility = $form_state['values']['yandex_metrics_visibility'];
$pages = $form_state['values']['yandex_metrics_pages'];
$visibility_roles = $form_state['values']['yandex_metrics_visibility_roles'];
$roles = $form_state['values']['yandex_metrics_roles'];
variable_set('yandex_metrics_counter_code', $counter_code);
variable_set('yandex_metrics_visibility', $visibility);
variable_set('yandex_metrics_pages', $pages);
variable_set('yandex_metrics_visibility_roles', $visibility_roles);
variable_set('yandex_metrics_roles', $roles);
drupal_set_message(t("The Counter Code settings has been saved successfully."));
}