public function SettingsWebformHandler::getSummary in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformHandler/SettingsWebformHandler.php \Drupal\webform\Plugin\WebformHandler\SettingsWebformHandler::getSummary()
Returns a render array summarizing the configuration of the webform handler.
Return value
array A render array.
Overrides WebformHandlerBase::getSummary
File
- src/
Plugin/ WebformHandler/ SettingsWebformHandler.php, line 79
Class
- SettingsWebformHandler
- Webform submission settings handler.
Namespace
Drupal\webform\Plugin\WebformHandlerCode
public function getSummary() {
$settings = $this
->getSettings();
$setting_definitions = $this
->getSettingsDefinitions();
$setting_override = $this
->getSettingsOverride();
foreach ($setting_override as $name => $value) {
switch ($setting_definitions[$name]['type']) {
case 'label':
case 'text':
case 'string':
$value = Unicode::truncate(strip_tags($value), 100, TRUE, TRUE);
break;
default:
break;
}
$settings['settings'][$name] = [
'title' => $setting_definitions[$name]['label'],
'value' => [
'#markup' => $value,
],
];
}
return [
'#settings' => $settings,
] + parent::getSummary();
}