You are here

function webform_service_get_components in Webform Service 6.3

Same name and namespace in other branches
  1. 7.4 webform_service.module \webform_service_get_components()

Returns the data structure for webform components.

2 calls to webform_service_get_components()
webform_service_get_submission in ./webform_service.module
Returns a single submission resource.
webform_service_get_webform in ./webform_service.module
Returns a data structure of a webform object.

File

./webform_service.module, line 119
Webform service module.

Code

function webform_service_get_components($webform) {
  $components = array();
  foreach ($webform['components'] as $cid => $component) {
    $components[$cid] = array(
      'cid' => $component['cid'],
      'form_key' => $component['form_key'],
      'name' => $component['name'],
      'type' => $component['type'],
    );
  }
  return $components;
}