You are here

public function IFrame::buildConfigurationForm in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/EntityBrowser/Display/IFrame.php \Drupal\entity_browser\Plugin\EntityBrowser\Display\IFrame::buildConfigurationForm()

Implements PluginFormInterface::buildConfigurationForm().

Overrides PluginConfigurationFormTrait::buildConfigurationForm

1 call to IFrame::buildConfigurationForm()
Modal::buildConfigurationForm in src/Plugin/EntityBrowser/Display/Modal.php
Implements PluginFormInterface::buildConfigurationForm().
1 method overrides IFrame::buildConfigurationForm()
Modal::buildConfigurationForm in src/Plugin/EntityBrowser/Display/Modal.php
Implements PluginFormInterface::buildConfigurationForm().

File

src/Plugin/EntityBrowser/Display/IFrame.php, line 241

Class

IFrame
Presents entity browser in an iFrame.

Namespace

Drupal\entity_browser\Plugin\EntityBrowser\Display

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $configuration = $this
    ->getConfiguration();
  $form['width'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Width of the iFrame'),
    '#default_value' => $configuration['width'],
    '#description' => $this
      ->t('Positive integer for absolute size or a relative size in percentages.'),
  ];
  $form['height'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Height of the iFrame'),
    '#min' => 1,
    '#default_value' => $configuration['height'],
  ];
  $form['link_text'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Link text'),
    '#default_value' => $configuration['link_text'],
  ];
  $form['auto_open'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Auto open entity browser'),
    '#default_value' => $configuration['auto_open'],
  ];
  return $form;
}