public function ThemePluginBase::build in Display Suite 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/DsField/ThemePluginBase.php \Drupal\ds\Plugin\DsField\ThemePluginBase::build()
- 8.2 src/Plugin/DsField/ThemePluginBase.php \Drupal\ds\Plugin\DsField\ThemePluginBase::build()
Renders a field.
Return value
array A renderable array representing the content of the field.
Overrides DsFieldBase::build
File
- src/
Plugin/ DsField/ ThemePluginBase.php, line 13
Class
- ThemePluginBase
- The base plugin to create DS theme fields.
Namespace
Drupal\ds\Plugin\DsFieldCode
public function build() {
$field = $this
->getConfiguration();
$format = $this
->formatter();
return [
'#markup' => _theme($format, $field),
];
}