function hierarchical_select_common_config_apply in Hierarchical Select 6.3
Same name and namespace in other branches
- 5.3 includes/common.inc \hierarchical_select_common_config_apply()
- 7.3 includes/common.inc \hierarchical_select_common_config_apply()
Apply a config to a form item.
Parameters
$form_item: The form item that will be updated.
$config_id: A config id.
$defaults_override: Optionally override the defaults. @see hierarchical_select_common_config_get()
4 calls to hierarchical_select_common_config_apply()
- hierarchical_select_common_config_form in includes/
common.inc - Form definition of the hierarchical_select_common_config_form form.
- hs_content_taxonomy_widget in modules/
hs_content_taxonomy.module - Implementation of hook_widget().
- hs_taxonomy_form in modules/
hs_taxonomy.module - hs_taxonomy_views_handler_filter_term_node_tid::value_form in modules/
hs_taxonomy_views_handler_filter_term_node_tid.inc
File
- includes/
common.inc, line 56 - Functions used by more than one Hierarchical Select implementation.
Code
function hierarchical_select_common_config_apply(&$form_item, $config_id, $defaults_override = array()) {
$config = hierarchical_select_common_config_get($config_id, $defaults_override);
$form_item['#config'] = array_merge(isset($form_item['#config']) && is_array($form_item['#config']) ? $form_item['#config'] : array(), $config);
}