public function Webform::componentByKey in Little helpers 7.2
Same name and namespace in other branches
- 7 src/Webform/Webform.php \Drupal\little_helpers\Webform\Webform::componentByKey()
Get the component array by it's form_key.
Parameters
string $form_key: form_key of the component.
Return value
array The component array (as in {webform_component}).
File
- src/
Webform/ Webform.php, line 36
Class
Namespace
Drupal\little_helpers\WebformCode
public function &componentByKey($form_key) {
if (isset($this->webform['cids'][$form_key])) {
return $this->webform['components'][$this->webform['cids'][$form_key]];
}
// Make return by reference work.
$return = array();
return $return;
}