protected function SearchApiElasticsearchAbstractService::viewSettingElement in Search API Elasticsearch 7
Helper function. Display a setting element.
1 call to SearchApiElasticsearchAbstractService::viewSettingElement()
- SearchApiElasticsearchElastica::viewSettings in modules/
elastica/ includes/ SearchApiElasticsearchElastica.inc - Overrides viewSettings().
File
- includes/
SearchApiElasticsearchAbstractService.inc, line 428 - Provides a Elasticsearch-based service class for the Search API.
Class
- SearchApiElasticsearchAbstractService
- Elasticsearch service abstract class.
Code
protected function viewSettingElement($element) {
$output = '';
if (is_array($element['option'])) {
$value = '';
foreach ($element['option'] as $sub_element) {
$value .= $this
->viewSettingElement($sub_element);
}
}
else {
$value = $this
->getOption($element['option']);
$value = nl2br(check_plain(print_r($value, TRUE)));
}
$output .= '<dt><em>' . check_plain($element['label']) . '</em></dt>' . "\n";
$output .= '<dd>' . $value . '</dd>' . "\n";
return "<dl>\n{$output}</dl>";
}