public function Submission::valuesByType in Little helpers 7.2
Same name and namespace in other branches
- 7 src/Webform/Submission.php \Drupal\little_helpers\Webform\Submission::valuesByType()
Get values for all components of a type.
Parameters
string $type: The webform component type.
Return value
array Values keyed by component ID.
File
- src/
Webform/ Submission.php, line 107
Class
- Submission
- A useful wrapper for webform submission objects.
Namespace
Drupal\little_helpers\WebformCode
public function valuesByType($type) {
$values = array();
foreach (array_keys($this->webform
->componentsByType($type)) as $cid) {
$values[$cid] = $this
->valueByCid($cid);
}
return $values;
}