You are here

private function FotoramaGalleryFormatter::fieldDimensionsNumberBuilder in Fotorama Gallery 8

Return a array with a field number settings.

Parameters

string $label: Label of the field.

string $field_key: Key of the field to construct.

Return value

array The array of field number settings.

1 call to FotoramaGalleryFormatter::fieldDimensionsNumberBuilder()
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 412

Class

FotoramaGalleryFormatter
Plugin implementation of the 'fotorama_gallery display' formatter.

Namespace

Drupal\fotorama_gallery\Plugin\Field\FieldFormatter

Code

private function fieldDimensionsNumberBuilder($label, $field_key) {
  return [
    '#title' => $label,
    '#type' => 'number',
    '#size' => 4,
    '#default_value' => $this
      ->getSetting('dimensions')[$field_key],
  ];
}