You are here

function _wfm_get_parent_keys in Webform Multiple (WFM) 7

Get the parent form keys of a component.

File

./wfm.module, line 748
Main module file for Webform Multiple (WFM).

Code

function _wfm_get_parent_keys(array $component, $components) {
  $keys = array();
  if (!empty($component['pid'])) {
    $parent_component = $components[$component['pid']];
    $keys = array_merge($keys, _wfm_get_parent_keys($parent_component, $components));
  }
  $keys[] = $component['form_key'];
  return $keys;
}