private function FotoramaGalleryFormatter::fieldDimensionsCheckBoxBuilder in Fotorama Gallery 8
Return a array with a field checkbox settings.
Parameters
string $field_key: Key of the field.
Return value
array Array of checkbox settings.
1 call to FotoramaGalleryFormatter::fieldDimensionsCheckBoxBuilder()
- FotoramaGalleryFormatter::settingsFormNumberFields in src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php - Fill $element with the Dimension fields information from the settings.
File
- src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php, line 430
Class
- FotoramaGalleryFormatter
- Plugin implementation of the 'fotorama_gallery display' formatter.
Namespace
Drupal\fotorama_gallery\Plugin\Field\FieldFormatterCode
private function fieldDimensionsCheckBoxBuilder($field_key) {
return [
'#type' => 'checkbox',
'#title' => $this
->t('Check if the value is a percentage'),
'#default_value' => $this
->getSetting('dimensions')[$field_key],
];
}