protected function WebformResultsCustomForm::getData in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Form/WebformResultsCustomForm.php \Drupal\webform\Form\WebformResultsCustomForm::getData()
Get custom data.
Parameters
string $name: The name for the custom data.
mixed $default: Default data.
Return value
mixed The custom data.
1 call to WebformResultsCustomForm::getData()
- WebformResultsCustomForm::buildForm in src/
Form/ WebformResultsCustomForm.php - Form constructor.
File
- src/
Form/ WebformResultsCustomForm.php, line 536
Class
- WebformResultsCustomForm
- Webform for webform results custom(ize) webform.
Namespace
Drupal\webform\FormCode
protected function getData($name, $default = NULL) {
$method = $this
->getDataMethod('get');
$key = $this
->getDataKey($name);
if ($this->type === static::CUSTOMIZE_USER) {
return $this->webform
->{$method}($key) ?: $this->webform
->getState($key) ?: $default;
}
else {
return $this->webform
->{$method}($key, $default) ?: $default;
}
}