You are here

function webform_validation_get_webform_components in Webform Validation 6

Same name and namespace in other branches
  1. 7 webform_validation.admin.inc \webform_validation_get_webform_components()

Get a list of components for a specific webform, filtered by the validator settings

1 call to webform_validation_get_webform_components()
webform_validation_manage_rule in ./webform_validation.admin.inc

File

./webform_validation.admin.inc, line 205
Manages validation rules administration UI

Code

function webform_validation_get_webform_components($node, $validator) {
  $ret = array();
  $components = $node->webform['components'];
  $valid_components = webform_validation_valid_component_types($validator);
  if ($components) {
    foreach ($components as $cid => $component) {
      if (in_array($component['type'], $valid_components)) {
        $ret[$cid] = _webform_filter_xss($component['name']);
      }
    }
  }
  return $ret;
}