private function FotoramaGalleryFormatter::settingsFormNumberFields in Fotorama Gallery 8
Fill $element with the Dimension fields information from the settings.
Parameters
array $element: Form elements.
1 call to FotoramaGalleryFormatter::settingsFormNumberFields()
- FotoramaGalleryFormatter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php - Returns a form to configure settings for the formatter.
File
- src/
Plugin/ Field/ FieldFormatter/ FotoramaGalleryFormatter.php, line 263
Class
- FotoramaGalleryFormatter
- Plugin implementation of the 'fotorama_gallery display' formatter.
Namespace
Drupal\fotorama_gallery\Plugin\Field\FieldFormatterCode
private function settingsFormNumberFields(array &$element) {
$dimensions_fields = $this->configFactory
->get('fotorama_gallery.settings')
->get('NumberFields');
foreach ($dimensions_fields as $field) {
$element['dimensions'][$field['key']] = $this
->fieldDimensionsNumberBuilder($field['data'], $field['key']);
$element['dimensions'][$field['percent']] = $this
->fieldDimensionsCheckBoxBuilder($field['percent']);
}
}