You are here

function webform_validation_get_all_components in Webform Validation 7

Same name and namespace in other branches
  1. 6 webform_validation.rules.inc \webform_validation_get_all_components()

Get info on all components that are available on a webform.

1 call to webform_validation_get_all_components()
webform_validation_get_rule_components in ./webform_validation.rules.inc
Get an array of components linked to a rule.

File

./webform_validation.rules.inc, line 94
Provides API and management functions for the webform validation rules.

Code

function webform_validation_get_all_components($nid) {
  $components = array();
  $result = db_query("SELECT * FROM {webform_component} WHERE nid = :nid", array(
    ':nid' => $nid,
  ), array(
    'fetch' => PDO::FETCH_ASSOC,
  ));
  foreach ($result as $row) {
    $components[$row['cid']] = $row;
  }
  return $components;
}