You are here

function hierarchical_select_common_config_apply in Hierarchical Select 5.3

Same name and namespace in other branches
  1. 6.3 includes/common.inc \hierarchical_select_common_config_apply()
  2. 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()

5 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_views_form_alter in modules/hs_content_taxonomy_views.module
Implementation of hook_form_alter().
hs_content_taxonomy_widget in modules/hs_content_taxonomy.module
Implementation of hook_widget().
hs_taxonomy_hierarchical_select_update_form_item in modules/hs_taxonomy.module
Update a taxonomy select to become a hierarchical_select type form item.
hs_taxonomy_views_form_alter in modules/hs_taxonomy_views.module
Implementation of hook_form_alter().

File

includes/common.inc, line 57
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(is_array($form_item['#config']) ? $form_item['#config'] : array(), $config);
}