private function FotoramaGalleryFormatter::settingsSummarySelectsFields in Fotorama Gallery 8
Construct the summary for each select field.
Parameters
array $summary: Summary array to be fill with the field information.
1 call to FotoramaGalleryFormatter::settingsSummarySelectsFields()
- FotoramaGalleryFormatter::settingsSummary in src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php - Returns a short summary for the current formatter settings.
File
- src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php, line 280
Class
- FotoramaGalleryFormatter
- Plugin implementation of the 'fotorama_gallery display' formatter.
Namespace
Drupal\fotorama_gallery\Plugin\Field\FieldFormatterCode
private function settingsSummarySelectsFields(array &$summary) {
$selects_fields = $this->configFactory
->get('fotorama_gallery.settings')
->get('SelectFields');
foreach ($selects_fields as $field) {
$value = $this
->getSetting($field['group'])[$field['key']];
if ($value != $field['defaultvalue']) {
$summary[] = $this
->t('@label: @value', [
'@label' => $field['data'],
'@value' => $field['options'][$value],
]);
}
}
}