function google_tag_form_variable_realm_edit_variables_form_alter in GoogleTagManager 7
Implements hook_form_FORM_ID_alter() for variable_realm_edit_variables_form().
This applies to:
- selected variables by realm with a path like:
admin/config/system/variable/realm/language/edit
- $form[#variable_options][realm]->realm and key
- $form_state[build_info][args] = [ [0] => realm_name, [1] => realm_key ]
- element parents are [variables][google_tag]
- and tree is true on variables key
- $form[#variable_edit_form] contains list of variables on the form
- which includes variables from other modules
File
- ./
google_tag.module, line 143 - Provides primary Drupal hook implementations.
Code
function google_tag_form_variable_realm_edit_variables_form_alter(&$form, &$form_state, $form_id) {
// @todo Why does variable_realm not set this item on this particular form?
$form['#realm_keys'][$form['#variable_options']['realm']->realm] = $form['#variable_options']['realm']->key;
$form['#submit'][] = 'google_tag_settings_form_submit';
form_load_include($form_state, 'inc', 'google_tag', 'includes/admin');
form_load_include($form_state, 'inc', 'google_tag', 'includes/variable');
}