protected function SiteSettingsRenderer::renderDefault in Site Settings and Labels 8
Render a normal text value.
Parameters
\Drupal\Core\Field\FieldItemListInterface $field: The field to render.
object $field_type: The field type to render.
Return value
\Drupal\Component\Render\MarkupInterface The rendered html markup.
Throws
\Exception
1 call to SiteSettingsRenderer::renderDefault()
- SiteSettingsRenderer::renderField in src/
SiteSettingsRenderer.php - Render the value of the added fields.
File
- src/
SiteSettingsRenderer.php, line 135
Class
- SiteSettingsRenderer
- Class SiteSettingsRenderer.
Namespace
Drupal\site_settingsCode
protected function renderDefault(FieldItemListInterface $field, $field_type) {
$view_builder = $this->entityTypeManager
->getViewBuilder('site_setting_entity');
$build = $view_builder
->viewField($field, [
'type' => $field_type,
'label' => 'hidden',
]);
return $this->renderer
->render($build);
}