You are here

public function PhotoGrid::buildOptionsForm in Views Photo Grid 8

Provide a form to edit options for this plugin.

Overrides StylePluginBase::buildOptionsForm

File

src/Plugin/views/style/PhotoGrid.php, line 52
Contains \Drupal\views_photo_grid\Plugin\views\style\PhotoGrid.

Class

PhotoGrid
Style plugin to render the photo grid.

Namespace

Drupal\views_photo_grid\Plugin\views\style

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['grid_padding'] = array(
    '#type' => 'number',
    '#title' => $this
      ->t('Padding'),
    '#size' => 2,
    '#description' => $this
      ->t('The amount of padding in pixels in between grid items.'),
    '#default_value' => $this->options['grid_padding'],
    '#maxlength' => 2,
  );
}