protected function ViewfieldFormatterDefault::getCheckboxLabel in Viewfield 8.3
Get a printable label for a checkbox value.
Parameters
string $value: The checkbox value.
Return value
string The label for the checkbox value.
1 call to ViewfieldFormatterDefault::getCheckboxLabel()
- ViewfieldFormatterDefault::settingsSummary in src/
Plugin/ Field/ FieldFormatter/ ViewfieldFormatterDefault.php - Returns a short summary for the current formatter settings.
File
- src/
Plugin/ Field/ FieldFormatter/ ViewfieldFormatterDefault.php, line 267
Class
- ViewfieldFormatterDefault
- Viewfield Default Formatter plugin definition.
Namespace
Drupal\viewfield\Plugin\Field\FieldFormatterCode
protected function getCheckboxLabel($value) {
return !empty($value) ? $this
->t('Yes') : $this
->t('No');
}